# openssl::rand - Rust
API documentation for the Rust `rand` mod in crate `openssl`.
Keywords: rust, rustlang, rust-lang, rand

# [−] [src] Module openssl::rand

Utilities for secure random number generation.

# Examples

To generate a buffer with cryptographically strong bytes:

    use openssl::rand::rand_bytes;

    let mut buf = [0; 256];
    rand_bytes(&mut buf).unwrap();

## Functions

keep_random_devices_open | Controls random device file descriptor behavior.
rand_bytes | Fill buffer with cryptographically strong pseudo-random bytes.