5.4.2.3 Crypto_Aead_AesEax_AddAadData
crypto_Aead_Status_E Crypto_Aead_AesEax_AddAadData(
st_Crypto_Aead_AesEax_ctx *ptr_aesEaxCtx_st,
uint8_t *ptr_aad,
uint32_t aadLen
);
Description
This API is used to include additional authentication data in an AES-EAX encrypted stream. To use it, first initialize the context by calling the Crypto_Aead_AesEax_Init function. Then, encrypt the data without additional authentication data by calling Crypto_Aead_AesEax_Cipher. Only after completing these steps, call this API. Finally, obtain the authentication tag by calling Crypto_Aead_AesEax_Final.
Parameters
No. | Argument Type | Argument Name | Type | Description |
---|---|---|---|---|
1 | st_Crypto_Aead_AesEax_ctx* | ptr_aesEaxCtx_st | Input | AES-EAX Algorithm context. |
2 | uint8_t* | ptr_aad | Input | Pointer for additional authentication data. It is optional to use, so it can be NULL also. |
3 | uint32_t | aadLen | Input | Length of additional authentication data in bytes, as it is optional so it can be 0 also. |
Returns
Return Type | Description |
---|---|
crypto_Aead_Status_E | Function returns the status of the API. |