# OXS Context
[OMXMLSecurity]

## Typedefs
typedef struct oxs_ctx_t | oxs_ctx_t
## Enumerations
enum | oxs_ctx_operation_t { OXS_CTX_OPERATION_NONE = 0, OXS_CTX_OPERATION_ENCRYPT, OXS_CTX_OPERATION_DECRYPT }
enum | oxs_ctx_mode_t { OXS_CTX_MODE_ENCRYPTED_DATA = 0, OXS_CTX_MODE_ENCRYPTED_KEY }
## Functions
AXIS2_EXTERN axis2_status_t | oxs_ctx_free (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN oxs_ctx_mode_t | oxs_ctx_get_mode (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN oxs_ctx_operation_t | oxs_ctx_get_operation (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN oxs_key_t * | oxs_ctx_get_key (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_id (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_type (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_mime_type (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_encoding (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_recipient (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_ref_key_name (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_enc_mtd_algorithm (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | oxs_ctx_get_input_data (oxs_ctx_t *ctx, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_mode (oxs_ctx_t *ctx, const axutil_env_t *env, oxs_ctx_mode_t mode)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_operation (oxs_ctx_t *ctx, const axutil_env_t *env, oxs_ctx_operation_t operation)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_key (oxs_ctx_t *ctx, const axutil_env_t *env, oxs_key_t *key)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_id (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *id)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_type (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *type)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_mime_type (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *mime_type)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_encoding (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *encoding)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_recipient (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *recipient)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_ref_key_name (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *ref_key_name)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_enc_mtd_algorithm (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *enc_mtd_algorithm)
AXIS2_EXTERN axis2_status_t | oxs_ctx_set_input_data (oxs_ctx_t *ctx, const axutil_env_t *env, axis2_char_t *input_data)
AXIS2_EXTERN oxs_ctx_t * | oxs_ctx_create (const axutil_env_t *env)

## Typedef Documentation

typedef struct oxs_ctx_t oxs_ctx_t

Type name for struct oxs_ctx

## Function Documentation

AXIS2_EXTERN axis2_status_t oxs_ctx_free | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Free function of the context

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_enc_mtd_algorithm | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_encoding | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_id | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_input_data | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN oxs_key_t* oxs_ctx_get_key | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_mime_type | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN oxs_ctx_mode_t oxs_ctx_get_mode | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Returns the mode of the context

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  mode of the context

AXIS2_EXTERN oxs_ctx_operation_t oxs_ctx_get_operation | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  operation of the context

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_recipient | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_ref_key_name | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN axis2_char_t* oxs_ctx_get_type | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct

Returns:
  of the context

AXIS2_EXTERN axis2_status_t oxs_ctx_set_enc_mtd_algorithm | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | enc_mtd_algorithm |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | enc_mtd_algorithm | the encryption method algorithm

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_encoding | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | encoding |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | encoding | the encoding used

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_id | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | id |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | id | the id of the context

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_input_data | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | input_data |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | input_data | the input data

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_key | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | oxs_key_t * | key |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | key | the key used

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_mime_type | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | mime_type |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | mime_type | the mime type used

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_mode | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | oxs_ctx_mode_t | mode |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | mode | the mode of operation, EncryptedData/EncryptedKey

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_operation | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | oxs_ctx_operation_t | operation |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | operation | the operation Encrypt/Decrypt/Sign/Verify

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_recipient | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | recipient |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | recipient | name of recipient

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_ref_key_name | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | ref_key_name |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | ref_key_name | the key name

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_ctx_set_type | ( | oxs_ctx_t * | ctx,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | type |
| ) |  |  |

Parameters:

  | ctx | The OMXMLSecurity context
  | env | pointer to environment struct
  | type | ???Depricated?

Returns:
  AXIS2_SUCCESS on success, else AXIS2_FAILURE