5.4.2.1 Crypto_Aead_AesEax_Init

crypto_Aead_Status_E Crypto_Aead_AesEax_Init(
    st_Crypto_Aead_AesEax_ctx *ptr_aesEaxCtx_st, 
    crypto_HandlerType_E handlerType_en, 
    crypto_CipherOper_E cipherOper_en, 
    uint8_t *ptr_key, 
    uint32_t keyLen, 
    uint8_t *ptr_nonce, 
    uint32_t nonceLen, 
    uint8_t *ptr_aad, 
    uint32_t aadLen, 
    uint32_t sessionID
    );

Description

This API is used to initiate the AES-EAX algorithm parameters for the context.

Parameters

No.Argument TypeArgument NameTypeDescription
1st_Crypto_Aead_AesEax_ctx*ptr_aesEaxCtx_stOutputAES-EAX Algorithm context.
2crypto_HandlerType_EhandlerType_enInputEnum for Crypto operation handler i.e., SW, HW.
3crypto_CipherOper_EcipherOper_en_enInputSelect cipher operation, encryption or decryption.
4uint8_t*ptr_keyInputKey for the AES-EAX cipher operation.
5uint32_tkeyLenInputKey length in bytes for the AES-EAX algorithm.
6uint8_t*ptr_nonceInputPointer for the Nonce value.
7uint32_tnonceLenInputLength of Nonce.
8uint8_t*ptr_aadInputPointer for additional authentication data. It is optional to use, so it can be NULL also.
9uint32_taadLenInputLength of additional authentication data in bytes, as it is optional so it can be 0 also.
10uint32_tsessionIDInputIt defines the session ID, must be more than zero.

Returns

Return TypeDescription
crypto_Aead_Status_EFunction returns the status of the API.