Expand description
Cryptographic primitives used by RustAuth core.
Modules§
- buffer
- Constant-time byte comparison helpers.
- jwt
- Minimal HS256 JWT helpers.
- password
- Password hashing and verification.
- random
- Secure random string generation.
Structs§
- Envelope
- Parsed RustAuth encrypted payload envelope.
- JweSecret
- Secret
Config - Secret rotation configuration.
- Secret
Entry - Versioned secret entry.
Traits§
- JweSecret
Source - Secret material accepted by Better Auth-compatible JWE helpers.
- Secret
Source - Secret material accepted by symmetric encryption helpers.
Functions§
- build_
secret_ config - Build a rotation config from validated entries.
- format_
envelope - Format a ciphertext with RustAuth’s secret-rotation envelope.
- parse_
envelope - Parse
$oa$<version>$<ciphertext>payloads. - parse_
secrets_ env - Parse comma-separated
version:secretentries. - symmetric_
decrypt - Decrypt a string with either a raw secret or a versioned secret config.
- symmetric_
encrypt - Encrypt a string with either a raw secret or a versioned secret config.
- validate_
secrets - Validate versioned secrets and return warnings for weak current secrets.