ZodString import type {Password} from '@fuzdev/fuz_app/auth/password.js'; Password for account creation or password change — enforces current length policy. Also usable for client-side UX validation.
Password hashing type definitions.
Defines the PasswordHashDeps injectable interface and PASSWORD_LENGTH_MIN. Concrete Argon2id implementation lives in auth/password_argon2.ts.
5 declarations
ZodString import type {Password} from '@fuzdev/fuz_app/auth/password.js'; Password for account creation or password change — enforces current length policy. Also usable for client-side UX validation.
300 import {PASSWORD_LENGTH_MAX} from '@fuzdev/fuz_app/auth/password.js'; Maximum password length. Caps hashing cost to prevent DoS via oversized passwords.
12 import {PASSWORD_LENGTH_MIN} from '@fuzdev/fuz_app/auth/password.js'; Minimum password length (OWASP recommendation).
PasswordHashDeps import type {PasswordHashDeps} from '@fuzdev/fuz_app/auth/password.js'; Injectable password hashing dependencies.
Groups all three password operations for injection in route factories
and other callers. Use Pick<PasswordHashDeps, ...> when only a subset is needed:
// Login handler only needs verification
password: Pick<PasswordHashDeps, 'verify_password' | 'verify_dummy'>;
// Bootstrap only needs hashing
password: Pick<PasswordHashDeps, 'hash_password'>;hash_passwordtype (password: string) => Promise<string>
verify_passwordtype (password: string, password_hash: string) => Promise<boolean>
verify_dummytype (password: string) => Promise<boolean>
ZodString import type {PasswordProvided} from '@fuzdev/fuz_app/auth/password.js'; Password submitted for login or verification — minimal validation for forward-compatibility if length requirements change.