5.5.2.2 Crypto_Aead_AesGcm_Cipher

crypto_Aead_Status_E Crypto_Aead_AesGcm_Cipher(
    st_Crypto_Aead_AesGcm_ctx *ptr_aesGcmCtx_st, 
    uint8_t *ptr_inputData, 
    uint32_t dataLen, 
    uint8_t *ptr_outData);

Description

This API handles AES-GCM encryption or decryption tasks. Before using it, initialize the context by invoking the Crypto_Aead_AesGcm_Init function. If additional associated data (AAD) is needed, use Crypto_Aead_AesGcm_AddAadData. Finally, if an authentication tag is necessary, call Crypto_Aead_AesGcm_Final as the last step.

Parameters

No.Argument TypeArgument NameTypeDescription
1st_Crypto_Aead_AesGcm_ctx*ptr_aesGcmCtx_stInputAES-GCM algorithm context.
2uint8_t*ptr_inputDataInputInput data to encrypt or decrypt.
3uint32_tdataLenInputLength of plain data or cipher data in bytes.
4uint8_t*ptr_outDataOutputPointer to store cipher text/plain text as output.

Returns

Return TypeDescription
crypto_Aead_Status_EFunction returns the status of the API.