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
Parameter | Description |
---|---|
[in] p_ctx | Pointer to the AES context structure. |
[in] length | The length of the data to be decrypted. Must be a multiple of 16 bytes, except for the last data fragment. |
[in] p_chiperText | Pointer to the buffer containing the data to be decrypted. |
[in] p_tag | Pointer to the buffer containing the authentication tag.Only be used if p_chiperText is the last data fragment. |
[out] p_plainText | Pointer to the buffer where the decrypted data will be stored. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Encryption successful. |
MBA_RES_FAIL | Encryption failed. |