Ajouter les fichiers de configuration pour VS Code et le fichier .gitignore
This commit is contained in:
commit
26020ecbc1
5 changed files with 426 additions and 0 deletions
11
security.py
Normal file
11
security.py
Normal 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)
|
Loading…
Add table
Add a link
Reference in a new issue