OxL Reference

method rand.token

A random token as lower-case hexadecimal text (2 * n characters).

Example:

oxl✓ checked in CI
use std.crypto { rand }

fn main() io, rand {
  print("{rand.token(8).len()}")
}
Output
16
pub(api) static fn token(n: usize) -> str  rand

Since. 1.0.0-beta

Parameters

NameType
nusize

Returns

str

Effects

rand

Defined in: std/crypto/crypto.oxl:299

See also