refactor: update hash_password and verify_password to use algorithm interface
This commit is contained in:
@@ -18,3 +18,9 @@ def test_hash_password_returns_base64() -> None:
|
||||
|
||||
def test_verify_password_handles_invalid_base64() -> None:
|
||||
assert verify_password("secret", "**invalid**", "???") is False
|
||||
|
||||
|
||||
def test_hash_password_with_algorithm_parameter():
|
||||
"""Verify hash_password accepts algorithm parameter."""
|
||||
salt, hashed = hash_password("test", algorithm="pbkdf2")
|
||||
assert verify_password("test", salt, hashed, algorithm="pbkdf2")
|
||||
|
||||
Reference in New Issue
Block a user