trilium/generate-password.py

15 lines
344 B
Python
Raw Normal View History

#!/usr/bin/python
import getpass
2017-09-10 01:53:58 +08:00
import src.my_scrypt
password1 = getpass.getpass()
2017-09-10 01:53:58 +08:00
password2 = getpass.getpass(prompt='Repeat the same password:')
if password1 == password2:
2017-09-10 01:53:58 +08:00
hash = src.my_scrypt.getVerificationHash(password1)
print('Generated password hash:')
2017-09-10 01:53:58 +08:00
print(hash)
else:
print('Entered passwords are not identical!')