AES Encryption API
Header File
Source: include/crypto/aes.h
#include <crypto/aes.h>
Functions
-
int aes_cbc_decrypt(uint8_t *out, const uint8_t *in, size_t inSz, const uint8_t *key, uint8_t *iv)
AES block decrypt
- Parameters:
out – [out] Output buffer to store decrypted data
in – [in] Input buffer containing encrypted data
inSz – [in] Size of data in input buffer
key – [in] Key buffer
iv – [in] IV buffer
- Returns:
0 on success, negative value on error
-
int aes_cbc_encrypt(uint8_t *out, const uint8_t *in, size_t inSz, const uint8_t *key, uint8_t *iv)
Encrypt a data buffer
- Parameters:
out – [out] Output buffer to store encrypted data
in – [in] Input data buffer
inSz – [in] Size of input data
key – [in] Key buffer
iv – [in] IV buffer
- Returns:
0 on success, negative value on error
