nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ ocrypto_aes_cbc_pkcs_update()

void ocrypto_aes_cbc_pkcs_update ( ocrypto_aes_cbc_pkcs_ctx * ctx,
uint8_t * out,
const uint8_t * in,
size_t in_len )

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

AES-CBC incremental encryption/decryption.

The input in is encrypted or decrypted to the output out using the context ctx.

This function can be called repeatedly until the whole message is processed.

Parameters
ctxContext.
[out]outOutput, ciphertext for encryption, plaintext for decryption.
inInput, plaintext for encryption, ciphertext for decryption.
in_lenLength of in.
Remarks
in may be same as out.
A single common buffer may be used for the whole plaintext and ciphertext if in and out of the first call are equal and incremented individually by the input and output size for each further call (meaning the plaintext and ciphertext are stored contiguously in the common buffer).
Initialization of the context ctx through ocrypto_aes_ctr_init is required before this function can be called.
The maximum length of out is in_len + 15.
The exact length of out is returned by ocrypto_aes_cbc_pkcs_output_size.