Moved hashing function to own module

This commit is contained in:
Andrew 2023-04-12 01:17:00 +07:00
parent 8cb89b2d50
commit 014d759961

6
secutils.py Normal file
View file

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