# Encryption
[OMXMLSecurity]

## Functions
AXIS2_EXTERN axis2_status_t | oxs_encryption_symmetric_crypt (const axutil_env_t *env, oxs_ctx_t *enc_ctx, oxs_buffer_t *input, oxs_buffer_t *result)
AXIS2_EXTERN axis2_status_t | oxs_encryption_asymmetric_crypt (const axutil_env_t *env, oxs_asym_ctx_t *asym_ctx, oxs_buffer_t *input, oxs_buffer_t *result)

## Function Documentation

AXIS2_EXTERN axis2_status_t oxs_encryption_asymmetric_crypt | ( | const axutil_env_t * | env,
|  | oxs_asym_ctx_t * | asym_ctx,
|  | oxs_buffer_t * | input,
|  | oxs_buffer_t * | result |
| ) |  |  |

En/Decrypts given data buffer deoending on the information avalable in the encryption context using an asymmetric key, which can be a publik key extracted from a certificate or a private key. The resulted data will be placed on the result buffer. Data are not valid only if the method returns AXIS2_SUCCESS pointer to the OMXMLSec asymmetric encryption context struct pointer to environment struct the input buffer

Returns:
  the ouput or the ressulted data buffer

  AXIS2_SUCCESS on success, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t oxs_encryption_symmetric_crypt | ( | const axutil_env_t * | env,
|  | oxs_ctx_t * | enc_ctx,
|  | oxs_buffer_t * | input,
|  | oxs_buffer_t * | result |
| ) |  |  |

En/Decrypts given data buffer depending on the information avalable in the encryption context using a symmetric key. The resulted data will be placed on the result buffer. Data are not valid only if the method returns AXIS2_SUCCESS pointer to the OMXMLSec symmetric encryption context struct pointer to environment struct the input buffer

Returns:
  the ouput or the ressulted data buffer

  AXIS2_SUCCESS on success, else AXIS2_FAILURE