Spaces:
Runtime error
Runtime error
Refactor Dockerfile and clean up unused schemas; update Redis client initialization and environment configuration
a3aa6c1
| import bcrypt | |
| class BcryptUtil: | |
| def hash_password(password: str) -> str: | |
| salt = bcrypt.gensalt() | |
| hashed_password = bcrypt.hashpw(password.encode("utf-8"), salt) | |
| return hashed_password.decode("utf-8") | |
| def compare_password(stored_password: str, provided_password: str) -> bool: | |
| stored_password = stored_password.encode("utf-8") | |
| provided_password = provided_password.encode("utf-8") | |
| return bcrypt.checkpw(provided_password, stored_password) | |