Skip to main content

Module random

Module random 

Source
Expand description

Cryptographically secure random byte generation.

Uses the getrandom crate for OS-provided entropy, which delegates to the appropriate platform-specific CSPRNG (e.g., /dev/urandom on Linux, SecRandomCopyBytes on macOS, BCryptGenRandom on Windows).

Functionsยง

random_bytes
Generate len cryptographically secure random bytes.