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