XSecure_AesEncryptData - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
Release Date
2021.1 English

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.


u32 XSecure_AesEncryptData(XSecure_Aes *InstancePtr, u8 *Dst, const u8 *Src, u32 Len);


The following table lists the XSecure_AesEncryptData function arguments.

Table 1. XSecure_AesEncryptData 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 XST_SUCCESS if encryption is successful