Skip to main content

Module secret

Module secret 

Source
Expand description

Randomness and hashing for credentials (kernel spec §3, §4).

Functions§

random_bytes
N bytes from the operating system’s CSPRNG.
rfc3339
RFC 3339, in UTC, for a kernel timestamp (seconds since the epoch), as the REST API shows it; empty for one out of range.
sha256_hex
Lowercase hex SHA-256: how pairing codes (and later session ids) are stored at rest.
unix_now
Seconds since the Unix epoch, the kernel tables’ time unit.