nrfxlib API 0.1.0
|
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.
ctx | Context. | |
[out] | out | Output, ciphertext for encryption, plaintext for decryption. |
in | Input, plaintext for encryption, ciphertext for decryption. | |
in_len | Length of in . |
in
may be same as out
. 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). ctx
through ocrypto_aes_ctr_init
is required before this function can be called. out
is in_len
+ 15. out
is returned by ocrypto_aes_cbc_pkcs_output_size
.