BALTECH SDK wrapper functions reference

§ aes_cbc_encrypt()

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

Encrypt data using AES-128 in CBC mode.

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