tuuli_backend/secutils.py

6 lines
180 B
Python

from hashlib import sha256
def hash_password(password: str):
"""Hash a password for storing."""
return sha256(password.encode("utf-8"), usedforsecurity=True).hexdigest()