Ajouter Dockerfile, requirements.txt, et mettre à jour les imports dans models.py et security.py
This commit is contained in:
parent
26020ecbc1
commit
c6579868d7
4 changed files with 41 additions and 6 deletions
|
@ -1,11 +1,9 @@
|
|||
from passlib.context import CryptContext
|
||||
|
||||
pwd_context = CryptContext(schemes=["argon2"])
|
||||
from passlib.hash import argon2
|
||||
|
||||
|
||||
def hash_password(password: str | bytes):
|
||||
return pwd_context.hash(password)
|
||||
return argon2.hash(password)
|
||||
|
||||
|
||||
def verify_password(password: str | bytes, hashed_password: str):
|
||||
return pwd_context.verify(password, hashed_password)
|
||||
return argon2.verify(password, hashed_password)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue