Ajouter les fichiers de configuration pour VS Code et le fichier .gitignore

This commit is contained in:
Pierre Berthe 2024-04-11 16:05:53 +02:00
commit 26020ecbc1
5 changed files with 426 additions and 0 deletions

11
security.py Normal file
View file

@ -0,0 +1,11 @@
from passlib.context import CryptContext
pwd_context = CryptContext(schemes=["argon2"])
def hash_password(password: str | bytes):
return pwd_context.hash(password)
def verify_password(password: str | bytes, hashed_password: str):
return pwd_context.verify(password, hashed_password)