implemented postgres support in repositories

This commit is contained in:
Brian Bjarke Jensen
2025-11-11 18:52:19 +01:00
parent 65655db034
commit e7ed89e04e
31 changed files with 364 additions and 236 deletions
+19
View File
@@ -0,0 +1,19 @@
"""Definition of verify_password function."""
import bcrypt
def verify_password(password: str, hashed_password: str) -> bool:
"""Verify a password against a hashed password.
Args:
password: Plain text password to verify
hashed_password: Previously hashed password
Returns:
True if password matches, False otherwise
"""
result: bool = bcrypt.checkpw(
password.encode("utf-8"), hashed_password.encode("utf-8")
)
return result