9 lines
229 B
Python
9 lines
229 B
Python
from passlib.hash import argon2
|
|
|
|
|
|
def hash_password(password: str | bytes):
|
|
return argon2.hash(password)
|
|
|
|
|
|
def verify_password(password: str | bytes, hashed_password: str):
|
|
return argon2.verify(password, hashed_password)
|