Skip to main content

08_random_bytes/
08_random_bytes.rs

1use security::SecureRandom;
2
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4    let bytes = SecureRandom::bytes(16)?;
5    println!("random_len={} first_byte={}", bytes.len(), bytes[0]);
6    Ok(())
7}