[][src]Function mundane::bytes::rand

pub fn rand(bytes: &mut [u8])

Reads cryptographically-secure random bytes.

This is a low-level primitive often used to construct higher-level protocols. Unless you're sure that this is what you need, you should probably be using something else. For example, all key types can be randomly generated using higher-level functions (e.g., EcPrivKey::generate), scrypt nonces are generated using the scrypt_generate function, etc.