nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ ocrypto_chacha20_update()

void ocrypto_chacha20_update ( ocrypto_chacha20_ctx * ctx,
uint8_t * c,
const uint8_t * m,
size_t m_len )

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

ChaCha20 encoder/decoder.

The message m is ChaCha20 encrypted and the resulting cipher stream is written to c.

For decryption, the ciphertext is used as input message m and the resulting decrypted message is written to c.

This function can be called repeatedly on arbitrarily small chunks of a larger message until the whole message has been processed.

Parameters
ctxEncoder/decoder state.
[out]cGenerated output (ciphertext or plaintext). Same length as input message.
mInput message.
m_lenLength of c and m; m_len < 2^38 bytes.
Remarks
Initialization of the encoder state ctx through ocrypto_chacha20_init is required before this function can be called.