pub fn random_byte_array(buf: &mut [u8])Expand description
The random_byte_array() function fills the given mutable byte array with an unpredictable sequence of bytes.
The random_byte_array() function safely wrap the randombytes_buf() function.
ยงExamples
use sodium_sys::crypto::utils::randombytes;
let mut ra0 = [0; 16];
randombytes::random_byte_array(&mut ra0);
assert!(ra0 != [0; 16]);