Spaces:
Sleeping
Sleeping
Download utils.py from persona-team/be: direct link, hf CLI and curl.
- Browser
- Download file 297 Bytes
-
https://huggingface.co/spaces/persona-team/be/resolve/main/utils.py
- Command line
-
hf download hf://spaces/persona-team/be/utils.py
-
curl -L -o utils.py https://huggingface.co/spaces/persona-team/be/resolve/main/utils.py
297 Bytes
| from passlib.context import CryptContext | |
| pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto") | |
| def hash_password(password: str) -> str: | |
| return pwd_context.hash(password) | |
| def verify_password(plain: str, hashed: str) -> bool: | |
| return pwd_context.verify(plain, hashed) | |