fix hashing password
This commit is contained in:
parent
028fb6bf93
commit
487f0f9597
7
auth.py
7
auth.py
|
@ -31,7 +31,12 @@ def write_pwdb(pwdb, PWDB_PATH):
|
||||||
|
|
||||||
|
|
||||||
def pwhash(pwd):
|
def pwhash(pwd):
|
||||||
return sha256(pwd)
|
encoded_pwd = pwd.encode("utf-8")
|
||||||
|
m = sha256()
|
||||||
|
m.update(encoded_pwd)
|
||||||
|
return m.hexdigest()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
PWDB_PATH = 'pwdb.json'
|
PWDB_PATH = 'pwdb.json'
|
||||||
|
|
Loading…
Reference in a new issue