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]
|
return pwhash(password) == pwdb[username]
|
||||||
|
|
||||||
def add_user(username, pwdb):
|
def add_user(username, pwdb):
|
||||||
password = input(f'Enter password for {username}: ')
|
password = getpass(f'Enter password for {username}: ')
|
||||||
pwdb[username] = pwhash(password)
|
pwdb[username] = pwhash(password)
|
||||||
return pwdb
|
return pwdb
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue