Skip to main content

generate_nonce

Function generate_nonce 

Source
pub fn generate_nonce() -> [u8; 12]
Expand description

Generate a fresh 12-byte nonce from the workspace CSPRNG.

Intended for use with ChaCha20Poly1305 alongside a key produced by generate_symmetric_key. The nonce is not stored in the payload itself — it lives next to the ciphertext in the encrypted GroupInfo blob.