Commit 849bd5a6 authored by Samer Afach's avatar Samer Afach

Function rename

parent e7a72a78
......@@ -9,9 +9,10 @@ import copy
_salt = "V5RlhpuwACffXuUNLex7Al9ulPy4SRHbyaAxWigjX9Z01OVaCO"
def GetDefaultSalt():
def get_default_salt():
return copy.deepcopy(_salt)
def encrypt_data(data_bytes, password, salt):
password_hash = argon2.argon2_hash(password=password, salt=salt)
encoded_hash = base64.urlsafe_b64encode(password_hash[:32])
......
......@@ -100,7 +100,7 @@ class AuthenticatorGUI(QMainWindow):
try:
with open(source_file[0], 'rb') as f_load:
ciphered_data = f_load.read()
readable_data = auth.decrypt_data(ciphered_data, password_from_dialog[0], auth.GetDefaultSalt())
readable_data = auth.decrypt_data(ciphered_data, password_from_dialog[0], auth.get_default_salt())
with open(dest_file[0], 'wb') as f_save:
f_save.write(readable_data)
......
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