implement sha256 hashing of password for security reason #7

Merged
otizonaizit merged 3 commits from romaingu/2024-heraklion-git:hash_pwd into main 2024-08-26 14:40:13 +02:00
Showing only changes of commit 487f0f9597 - Show all commits

View file

@ -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()
Review

Too many empty lines here.

Too many empty lines here.
if __name__ == "__main__": if __name__ == "__main__":
PWDB_PATH = 'pwdb.json' PWDB_PATH = 'pwdb.json'