gen-question / src /utils /password.py
linhnguyen02
set up to deploy in hugging face
42cffde
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'))