hash password upon creation
This commit is contained in:
parent
b42ef06d91
commit
7d3a0d6bd9
2
auth.py
2
auth.py
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue