BALTECH SDK wrapper functions reference

§ aes_cbc_decrypt()

int aes_cbc_decrypt ( aes_ctx  ctx,
const unsigned char *  ciphertext,
size_t  ciphertext_len,
unsigned char *  plaintext,
const unsigned char  iv[AES_BLOCK_SIZE] 
)

Decrypt data using AES-128 in CBC mode.

Parameters
ctxAES context from aes_create_ctx()
ciphertextInput data
ciphertext_lenLength in bytes (must be multiple of AES_BLOCK_SIZE)
plaintextOutput buffer (same length as ciphertext)
iv16-byte initialization vector
Returns
AES_OK on success, AES_ERR_* on error