island: Specify mode to open new secure file in, in encryptor.py

This commit is contained in:
Shreya 2021-06-15 19:29:49 +05:30
parent 64ac1fe706
commit 80bfd90074
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class Encryptor:
def _init_key(self, password_file):
self._cipher_key = Random.new().read(self._BLOCK_SIZE)
with open(get_file_descriptor_for_new_secure_file(path=password_file)) as f:
with open(get_file_descriptor_for_new_secure_file(path=password_file), "wb") as f:
f.write(self._cipher_key)
def _load_existing_key(self, password_file):