[][src]Function xsalsa20poly1305::generate_nonce

pub fn generate_nonce<T>(csprng: &mut T) -> Nonce where
    T: RngCore + CryptoRng
This is supported on crate feature rand_core only.

Generate a random nonce: every message MUST have a unique nonce!

Do NOT ever reuse the same nonce for two messages!