Function xsalsa20poly1305::generate_nonce [−][src]
pub fn generate_nonce<T>(csprng: &mut T) -> Nonce where
T: RngCore + CryptoRng,
This is supported on crate feature
rand_core
only.Expand description
Generate a random nonce: every message MUST have a unique nonce!
Do NOT ever reuse the same nonce for two messages!