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

◆ ocrypto_aes_cbc_pkcs_init()

void ocrypto_aes_cbc_pkcs_init ( ocrypto_aes_cbc_pkcs_ctx *  ctx,
const uint8_t *  key,
size_t  size,
const uint8_t  iv[16],
int  decrypt 
)

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

AES-CBC initialization.

The context ctx is initialized using the given key key and initial vector iv.

Parameters
[out]ctxContext.
keyAES key. May be NULL.
sizeKey size (16, 24, or 32 bytes).
ivInitial vector. May be NULL.
decryptIf 0, initialize for encryption; If 1, initialize for decryption.
Remarks
If key is NULL only iv is set. If iv is NULL only key is set. If not set by the same call, key must be set before iv.