Spaces:
Runtime error
Runtime error
Download app/utils/hashing.py from ismaileghazi/test: direct link, hf CLI and curl.
- Browser
- Download file 347 Bytes
-
https://huggingface.co/spaces/ismaileghazi/test/resolve/main/app/utils/hashing.py
- Command line
-
hf download hf://spaces/ismaileghazi/test/app/utils/hashing.py
-
curl -L -o hashing.py https://huggingface.co/spaces/ismaileghazi/test/resolve/main/app/utils/hashing.py
347 Bytes
| from passlib.context import CryptContext | |
| pwd_context = CryptContext(schemes=["argon2"], deprecated="auto") | |
| class Hash: | |
| def bcrypt(password: str): | |
| return pwd_context.hash(password) | |
| def verify(plain_password, hashed_password): | |
| return pwd_context.verify(plain_password, hashed_password) | |