hashed-psw #14

Open
annabo wants to merge 2 commits from annabo/2024-heraklion-git:hashed-psw into main
Showing only changes of commit 7d3a0d6bd9 - Show all commits

View file

@ -6,6 +6,7 @@ PWDB_PATH = 'pwdb.json'
def get_credentials():
username = input('Enter your username: ')
password = hash_psw(getpass('Enter your password: '))
password = getpass('Enter your password: ')
return (username, password)
@ -13,6 +14,7 @@ def authenticate(username, password, pwdb):
return password == pwdb[username]
def add_user(username, pwdb):
pwdb[username] = hash_psw(input(f'Enter password for {username}: '))
pwdb[username] = input(f'Enter password for {username}: ')
return pwdb