method rand.secure
n random bytes (n up to 16 MiB).
Example:
use std.crypto { rand }
fn main() io, rand {
print("{rand.secure(16).len()}")
}Output
16
pub(api) static fn secure(n: usize) -> bytes randSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
n | usize |
Returns
bytes
Effects
rand
Defined in: std/crypto/crypto.oxl:285