Function crypto_box::generate_nonce [−][src]
pub fn generate_nonce<T>(
csprng: &mut T
) -> GenericArray<u8, <XSalsa20 as NewCipher>::NonceSize> where
T: RngCore + CryptoRng,
Expand description
Generate a random nonce: every message MUST have a unique nonce!
Do NOT ever reuse the same nonce for two messages!