diff --git a/tools/encfs_aes_getpass.py b/tools/encfs_aes_getpass.py index 64ba603f80..0680ef9559 100755 --- a/tools/encfs_aes_getpass.py +++ b/tools/encfs_aes_getpass.py @@ -98,13 +98,15 @@ def main(): raise ValueError("32 bytes password expected") bip32_path = [10, 0] + sys.stderr.write('Generated password is {}\n'.format(passw)) passw_encrypted = client.encrypt_keyvalue(bip32_path, label, passw, False, True) + sys.stderr.write('Encrypted password is {}\n'.format(passw_encrypted)) data = {'label': label, 'bip32_path': bip32_path, - 'password_encrypted_hex': binascii.hexlify(passw_encrypted)} + 'password_encrypted_hex': binascii.hexlify(passw_encrypted).decode('ascii')} - json.dump(data, open(passw_file, 'wb')) + json.dump(data, open(passw_file, 'w')) # Let's load password data = json.load(open(passw_file, 'r')) @@ -115,6 +117,7 @@ def main(): binascii.unhexlify(data['password_encrypted_hex']), False, True) + sys.stderr.write('Submitting password {}\n'.format(passw)) print(passw)