Initial commit
Build and Push Docker Image / build-and-push (push) Successful in 18s

This commit is contained in:
ciomek committed 2026-08-16 11:41:07 +02:00
commit 279b2a7e90
49 files changed
+2664

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
from argon2 import PasswordHasher
from argon2.exceptions import InvalidHashError, VerifyMismatchError
def hash_password(password: str) -> str:
ph = PasswordHasher()
hashed = ph.hash(password)
return str(hashed)
def verify_password(password: str, hashed_password: str) -> bool:
ph = PasswordHasher()
try:
return ph.verify(hashed_password, password)
except (VerifyMismatchError, InvalidHashError):
return False