Commit 7b6aeaec authored by Samer Afach's avatar Samer Afach

Changed file encoding to UTF-8

parent 0942b4d1
......@@ -31,7 +31,7 @@ def write_keys_to_file(auth_keys, password, file_name="data.dat"):
if os.path.exists(file_name):
os.rename(file_name, backup_file)
with open(file_name, 'wb') as f:
f.write(encrypt_data(auth_keys.dump_data().encode(), password, _salt))
f.write(encrypt_data(auth_keys.dump_data().encode('utf-8'), password, _salt))
if os.path.exists(backup_file):
os.remove(backup_file)
......@@ -41,7 +41,7 @@ def read_keys_from_file(password, file_name="data.dat"):
ciphered_data = f.read()
readable_data = decrypt_data(ciphered_data, password, _salt)
keys_object = AuthenticatorKeys()
keys_object.read_dump(readable_data.decode())
keys_object.read_dump(readable_data.decode('utf-8'))
return keys_object
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment