refactor: update hash_password and verify_password to use algorithm interface

This commit is contained in:
jhummel committed 2025-11-13 13:18:22 +00:00
1 parent 6ca905cd1e
commit c85c68f859
2 files changed
+15 -25

No files matched your search

+6
View File
@@ -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")