hash_dev #10

Open
jonassc wants to merge 3 commits from jonassc/2024-heraklion-git:hash_dev into main
Showing only changes of commit 3dd3e3e310 - Show all commits

View file

@ -10,10 +10,10 @@ def get_credentials():
return (username, password)
def authenticate(username, password, pwdb):
return password == pwdb[username]
return hash_password(password) == pwdb[username]
def add_user(username, pwdb):
pwdb[username] = input(f'Enter password for {username}: ')
pwdb[username] = hash_password(input(f'Enter password for {username}: '))
return pwdb
def read_pwdb(PWDB_PATH):