nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ ocrypto_aes_cbc_pkcs_decrypt()

int ocrypto_aes_cbc_pkcs_decrypt ( uint8_t *  pt,
size_t *  pt_len,
const uint8_t *  ct,
size_t  ct_len,
const uint8_t *  key,
size_t  size,
const uint8_t  iv[16] 
)

#include <crypto/nrf_oberon/include/ocrypto_aes_cbc_pkcs.h>

AES-CBC-PKCS7 decryption.

Parameters
[out]ptPlaintext.
[out]pt_lenPlaintext length.
ctCiphertext.
ct_lenCiphertext length. Must be a multiple of 16.
keyAES key.
sizeKey size (16, 24, or 32).
ivInitial vector.
Return values
0If the input is properly padded.
-1Otherwise.
Remarks
pt may be same as ct.
The maximum length of pt is ct_len - 1.