Expand description
Password hashing and digest helpers.
Passwords are hashed with Argon2 and a fresh salt for storage, while SHA-256 helpers cover the deterministic digest cases used by services. The module keeps formatting helpers centralized so hex output stays lowercase and stable across call sites.
Functionsยง
- bytes_
to_ hex - Encodes arbitrary bytes as lowercase hex.
- hash_
password - Hashes a password with Argon2 and a fresh random salt.
- new_
sha256 - Creates a new incremental SHA-256 hasher.
- sha256_
digest_ to_ hex - Encodes a SHA-256 digest as lowercase hex.
- sha256_
hex - Computes the SHA-256 digest of
dataand returns lowercase hex. - verify_
password - Verifies a password against a stored Argon2 password hash.