Password
Auth
Opaque password hashes. Plaintext never appears in query results.
New hashes use **Argon2id** (PHC string $argon2id$v=19$m=…,t=…,p=…$…$…). verify also accepts legacy pbkdf2_sha256$… hashes so existing rows keep working through a migrate-on-login path.
Types
Password
type Password = PasswordStored password hash. Construct only via hash.
Examples
Password.hash "hunter2"Values
hash
hash : String -> Transaction PasswordHash plaintext with Argon2id (OWASP defaults: m=19456 KiB, t=2, p=1). Returns an opaque Password whose encoding is distinct from legacy PBKDF2.
Examples
Repo.transaction (Password.hash plaintext)verify
verify : String -> Password -> Transaction BoolCheck plaintext against a stored Password hash (Argon2id or legacy PBKDF2).
Examples
Password.verify plaintext user.passwordHash