mirror of
https://github.com/Magnus167/rustframe.git
synced 2025-11-21 21:36:16 +00:00
Enhance documentation with usage examples for random number generation utilities
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
//! Cryptographically secure random number generator.
|
||||
//!
|
||||
//! On Unix systems this reads from `/dev/urandom`; on Windows it uses the
|
||||
//! system's preferred CNG provider.
|
||||
//!
|
||||
//! ```
|
||||
//! use rustframe::random::{crypto_rng, Rng};
|
||||
//! let mut rng = crypto_rng();
|
||||
//! let _v = rng.next_u64();
|
||||
//! ```
|
||||
#[cfg(unix)]
|
||||
use std::{fs::File, io::Read};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user