Functions#
This section provides a reference to the AES Crypto API Functions.
Functions#
To encrypt or decrypt the message according to the given configuration.
Encrypts or decrypts a chunk of a message according to the given configuration.
Function Documentation#
sl_si91x_aes#
sl_status_t sl_si91x_aes (sl_si91x_aes_config_t * config, uint8_t * output)
To encrypt or decrypt the message according to the given configuration.
Type | Direction | Argument Name | Description |
---|---|---|---|
sl_si91x_aes_config_t * | [in] | config | Configuration object of type sl_si91x_aes_config_t |
uint8_t * | [out] | output | Buffer to store the output. |
This is a blocking API. Note
The maximum length of the message in bytes that can be handled in one go is determined by SLI_SI91X_MAX_DATA_SIZE_IN_BYTES_FOR_AES. If the message length is not a multiple of SL_SI91X_AES_BLOCK_SIZE, the function returns an error.
Returns
sl_status_t. For more information on status codes, refer to SL STATUS DOCUMENTATION.
sl_si91x_aes_multipart#
sl_status_t sl_si91x_aes_multipart (const sl_si91x_aes_config_t * config, uint16_t chunk_length, uint8_t aes_flags, uint8_t * output)
Encrypts or decrypts a chunk of a message according to the given configuration.
Type | Direction | Argument Name | Description |
---|---|---|---|
const sl_si91x_aes_config_t * | [in] | config | Configuration object of type sl_si91x_aes_config_t containing the AES operation parameters. |
uint16_t | [in] | chunk_length | Length of the current chunk to be processed in bytes. |
uint8_t | [in] | aes_flags | Flags indicating the position of the current chunk. Valid values are:- SL_SI91X_AES_FIRST_CHUNK, SL_SI91X_AES_MIDDLE_CHUNK, SL_SI91X_AES_LAST_CHUNK. Buffer to store the processed output data. |
uint8_t * | N/A | output |
This is a blocking API. Returns
sl_status_t. For more information on status codes, refer to SL STATUS DOCUMENTATION.
Note
The maximum length of the message in bytes that can be handled in one go is determined by SLI_SI91X_MAX_DATA_SIZE_IN_BYTES_FOR_AES.
If the message length is not a multiple of SL_SI91X_AES_BLOCK_SIZE, the function returns an error.