Function nrfxlib_sys::ocrypto_chacha20_update
source · pub unsafe extern "C" fn ocrypto_chacha20_update(
ctx: *mut ocrypto_chacha20_ctx,
c: *mut u8,
m: *const u8,
m_len: usize
)
Expand description
ChaCha20 encoder.
The message * m
- is ChaCha20 encrypted and the resulting cipher stream
is writen to * c
- .
This function can be called repeatedly on arbitrarily small chunks of a larger message until the whole message has been processed.
ctx
- Encoder state.c
- Generated ciphertext. Same length as input message.m
- Input message.m_len
- Length of *c
- and *m
- ; *m_len
- < 2^38 bytes.
@remark Initialization of the encoder state * ctx
- through
* ocrypto_chacha20_init
- is required before this function can be called.