AES Encryption API

Header File

Functions

int aes_cbc_decrypt(uint8_t *out, const uint8_t *in, size_t inSz, const uint8_t *key, const uint8_t *iv)

AES block decrypt

Return

0 on success, negative value on error

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

int aes_cbc_encrypt(uint8_t *out, const uint8_t *in, size_t inSz, const uint8_t *key, const uint8_t *iv)

Encrypt a data buffer

Return

0 on success, negative value on error

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