Moved hashing function to own module
This commit is contained in:
parent
8cb89b2d50
commit
014d759961
1 changed files with 6 additions and 0 deletions
6
secutils.py
Normal file
6
secutils.py
Normal 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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue