scify-demo / hash.py
pmtaday's picture
Authentication added
2c8b701
raw
history blame contribute delete
257 Bytes
import bcrypt
def hash_password(password: str) -> str:
hashed = bcrypt.hashpw(password.encode(), bcrypt.gensalt())
return hashed.decode()
new_password = ""
hashed_password = hash_password(new_password)
print(f"Hashed Password: {hashed_password}")