Expand description
Secrets, derived keys, signing, encryption, hashing and password hashing.
See docs/concepts/03-security.md.
Structs§
- Argon2id
- argon2id with OWASP parameters: 19 MiB, t=2, p=1.
- Hash
- SHA-256 digest. Stored instead of tokens.
- Keys
- Keys derived from the configured secrets. The first secret signs and encrypts; every secret verifies and decrypts, so secrets rotate without signing anyone out.
- Passwords
- Runs a
PasswordHasheron the blocking pool behind a semaphore, so a burst of sign-ins can’t allocate unbounded argon2 memory. - Secret
- A master secret. Zeroized on drop; never printed.
Enums§
Traits§
- Password
Hasher - Password hashing. Runs on a blocking thread; see
Passwords.
Functions§
- base64url
- base64url_
decode - ct_eq
- Constant-time string equality.
- random_
bytes - random_
string - A random string from
alphabet, without modulo bias. - random_
token - 32 random bytes as base64url (43 chars): session tokens, verification values, state.