Init files

This commit is contained in:
2021-07-23 14:48:20 +09:00
commit f1186d7483
38 changed files with 480 additions and 0 deletions

10
auth/hashing.py Normal file
View File

@ -0,0 +1,10 @@
from passlib.context import CryptContext
pwd_cxt = CryptContext(schemes=["bcrypt"], deprecated="auto")
class Hash():
def bcrypt(password: str):
return pwd_cxt.hash(password)
def verify(plain_password, hashed_password):
return pwd_cxt.verify(plain_password,hashed_password)