esp_aes_crypt_cbc() function
AES-CBC buffer encryption/decryption Length should be a multiple of the block size (16 bytes)
Arguments
mode
AES_ENCRYPT or AES_DECRYPT
length
length of the input data
iv
initialization vector (updated after use)
input
buffer holding the input data
output
buffer holding the output data
Return value
0 if successful, or ERR_AES_INVALID_INPUT_LENGTH
Notes
Upon exit, the content of the IV is updated so that you can call the function same function again on the following block(s) of data and get the same result as if it was encrypted in one call. This allows a "streaming" usage. If on the other hand you need to retain the contents of the IV, you should either save it manually or use the cipher module instead.
esp_aes_crypt_cbc() is called by 3 functions and calls 8 functions:
![]()
esp_aes_crypt_cbc()
esp_aes_crypt_cbc() reads 8 variables and writes 1 variable:
![]()
esp_aes_crypt_cbc()