MW_AES_AesCcmDecrypt

C

uint16_t MW_AES_AesCcmDecrypt(MW_AES_Ctx_T * p_ctx, uint16_t length, uint8_t *p_cipherText, uint8_t *p_tag, uint8_t *p_plainText);

Description

Decrypts data using AES CCM mode.

Parameters

ParameterDescription
[in] p_ctxPointer to the AES context structure.
[in] lengthThe length of the data to be decrypted. Must be a multiple of 16 bytes, except for the last data fragment.
[in] p_chiperTextPointer to the buffer containing the data to be decrypted.
[in] p_tagPointer to the buffer containing the authentication tag.Only be used if p_chiperText is the last data fragment.
[out] p_plainTextPointer to the buffer where the decrypted data will be stored.

Return values

Return valueDescription
MBA_RES_SUCCESSEncryption successful.
MBA_RES_FAILEncryption failed.