enlace_auth.auth.passwords#
Password hashing via argon2id.
argon2-cffi ships PasswordHasher which handles salting, tuning, and
constant-time verification. We surface only two helpers to keep callers away
from parameter tuning.
Module Attributes
registration, the admin API, reset, change, and the |
Functions
|
Return an argon2id hash string for |
|
Why password may not be set, or |
|
Return True iff |
- enlace_auth.auth.passwords.MIN_PASSWORD_LEN = 8#
registration, the admin API, reset, change, and the
add-user/set-passwordCLI.- Type:
Minimum password length, for every way a password is set
- enlace_auth.auth.passwords.hash_password(password)[source]#
Return an argon2id hash string for
password.- Return type:
- enlace_auth.auth.passwords.password_problem(password)[source]#
Why password may not be set, or
Noneif it may.The one rule every way of setting a password applies (see
MIN_PASSWORD_LEN), so they cannot drift apart.>>> password_problem("long-enough") >>> password_problem("short") 'Password must be at least 8 characters.'