Function nrfxlib_sys::ocrypto_chacha20_poly1305_final_dec
source · pub unsafe extern "C" fn ocrypto_chacha20_poly1305_final_dec(
ctx: *mut ocrypto_chacha20_poly1305_ctx,
tag: *const u8
) -> c_int
Expand description
ChaCha20-Poly1305 final decoder step.
The generator state * ctx
- is used to finalize the decryption and check the tag.
ctx
- Generator state.tag
- Received authentication tag.
Returns 0 If * tag
- is valid.
Returns -1 Otherwise.