method rand.token
A random token as lower-case hexadecimal text (2 * n characters).
Example:
use std.crypto { rand }
fn main() io, rand {
print("{rand.token(8).len()}")
}Output
16
pub(api) static fn token(n: usize) -> str randSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
n | usize |
Returns
str
Effects
rand
Defined in: std/crypto/crypto.oxl:299