Implement simple password hashing #9
2
auth.py
2
auth.py
|
@ -13,7 +13,7 @@ def authenticate(username, password, pwdb):
|
|||
return pwhash(password) == pwdb[username]
|
||||
|
||||
def add_user(username, pwdb):
|
||||
password = input(f'Enter password for {username}: ')
|
||||
password = getpass(f'Enter password for {username}: ')
|
||||
pwdb[username] = pwhash(password)
|
||||
return pwdb
|
||||
|
||||
|
|
Loading…
Reference in a new issue