Expand description
Random number generation implementations for different target environments.
This module provides conditional compilation for RNG implementations:
- Browser: Uses crypto.getRandomValues() via getrandom with “js” feature
- NEAR: Uses env::random_seed() with enhanced entropy via ChaCha20
Re-exports§
pub use browser::WasmRng as BrowserWasmRng;pub use browser::WasmRngFromSeed as BrowserWasmRngFromSeed;pub use browser::WasmRng;pub use browser::WasmRngFromSeed;
Modules§
- browser
- Browser-specific RNG implementation using crypto.getRandomValues()
Traits§
- Crypto
Rng - A marker trait used to indicate that an
RngCoreorBlockRngCoreimplementation is supposed to be cryptographically secure. - RngCore
- The core of a random number generator.
Functions§
- get_
rng_ implementation - Get the current default RNG implementation name