Passwords¶
bluefox_auth.passwords
Direct bcrypt password hashing — no wrapper libraries.
Functions¶
hash_password¶
Hash a plaintext password with bcrypt. Returns a string like $2b$12$....
verify_password¶
Verify a plaintext password against a bcrypt hash.
verify_password_timing_safe¶
Verify a password, falling back to a pre-computed dummy hash if hashed is None. This prevents timing-based user enumeration — the bcrypt comparison takes the same amount of time whether the user exists or not.
Used by the login flow: