password is moved out of config file into separate generated file

This commit is contained in:
azivner
2017-09-09 14:21:57 -04:00
parent 22749f252b
commit c06c837904
6 changed files with 29 additions and 23 deletions

View File

@@ -2,6 +2,8 @@
import getpass
import src.my_scrypt
import binascii
import src.password_provider
password1 = getpass.getpass()
password2 = getpass.getpass(prompt='Repeat the same password:')
@@ -9,7 +11,8 @@ password2 = getpass.getpass(prompt='Repeat the same password:')
if password1 == password2:
hash = src.my_scrypt.getVerificationHash(password1)
print('Generated password hash:')
print(hash)
src.password_provider.setPasswordHash(binascii.hexlify(hash))
print('Password has been generated and saved into password.txt. You can now login.')
else:
print('Entered passwords are not identical!')