test / src /utils /password.py
linhnguyen02
set up to deploy in hugging face
f369443
Raw History Blame Contribute Delete
407 Bytes
# import bcrypt
# class PasswordUtils:
# @staticmethod
# def hash_password(password: str) -> str:
# hashed = bcrypt.hashpw(password.encode('utf-8'), bcrypt.gensalt())
# return hashed.decode('utf-8')
# @staticmethod
# def check_password(password: str, hashed_password: str) -> bool:
# return bcrypt.checkpw(password.encode('utf-8'), hashed_password.encode('utf-8'))