initial commit
This commit is contained in:
12
app/auth.py
Normal file
12
app/auth.py
Normal file
@ -0,0 +1,12 @@
|
||||
from argon2 import PasswordHasher
|
||||
|
||||
ph = PasswordHasher()
|
||||
|
||||
def hash_password(password):
|
||||
return ph.hash(password)
|
||||
|
||||
def verify(expected, given):
|
||||
try:
|
||||
return ph.verify(expected, given)
|
||||
except:
|
||||
return False
|
Reference in New Issue
Block a user