This function encrypts Len (length) number of bytes of the passed in Src (source) buffer and stores the encrypted data along with its associated 16 byte tag in the Dst (destination) buffer.
Note: If data to be encrypted is not available in one buffer one can call
XSecure_AesEncryptInit()
and update the AES engine with data to be encrypted by calling
XSecure_AesEncryptUpdate()
API multiple times as required. Prototype
u32 XSecure_AesEncryptData(XSecure_Aes *InstancePtr, u8 *Dst, const u8 *Src, u32 Len);
Parameters
The following table lists the XSecure_AesEncryptData
function arguments.
Name | Description |
---|---|
InstancePtr | A pointer to the XSecure_Aes instance. |
Dst | A pointer to a buffer where encrypted data along with GCM tag will be stored. The Size of buffer provided should be Size of the data plus 16 bytes |
Src | A pointer to input data for encryption. |
Len | Size of input data in bytes, whereas the number of bytes provided should be multiples of 4. |
Returns
None