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 TypeArgument NameTypeDescription
1st_Crypto_Aead_AesEax_ctx*ptr_aesEaxCtx_stInputAES-EAX Algorithm context.
2uint8_t*ptr_aadInputPointer for additional authentication data. It is optional to use, so it can be NULL also.
3uint32_taadLenInputLength of additional authentication data in bytes, as it is optional so it can be 0 also.

Returns

Return TypeDescription
crypto_Aead_Status_EFunction returns the status of the API.