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 Type | Argument Name | Type | Description |
---|---|---|---|---|
1 | st_Crypto_Aead_AesGcm_ctx* | ptr_aesGcmCtx_st | Input | AES-GCM algorithm context. |
2 | uint8_t* | ptr_inputData | Input | Input data to encrypt or decrypt. |
3 | uint32_t | dataLen | Input | Length of plain data or cipher data in bytes. |
4 | uint8_t* | ptr_outData | Output | Pointer to store cipher text/plain text as output. |
Returns
Return Type | Description |
---|---|
crypto_Aead_Status_E | Function returns the status of the API. |