Skip to content

Commit

Permalink
Refactor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
clach04 committed Nov 17, 2024
1 parent 343b322 commit 96f43ea
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions puren_tonbo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ def write_to(self, file_object, byte_data):

class ZipEncryptedFileBase(EncryptedFile):
_filename = 'encrypted.md' # filename inside of (encrypted) zip file
_compression = ZIP_DEFLATED
_compression = ZIP_DEFLATED # which compression to apply `_filename` in the zip; DEFLATED == regular zip compression
extensions = [
'.aes.zip', # AE-1 only Zip file with AES-256 - Standard WinZip/7z (not the old ZipCrypto!)
'.aes256.zip', # Zip file with AES-256 - Standard WinZip/7z (not the old ZipCrypto!)
Expand Down Expand Up @@ -682,7 +682,7 @@ def write_to(self, file_object, byte_data):

class ZipNoCompressionPurePyZipAES(PurePyZipAES):
description = 'AES-256 ZIP AE-1 STORED (uncompressed)'
_compression = ZIP_STORED
_compression = ZIP_STORED # no zip compression
extensions = [
'.aes256stored.zip', # uncompressed Zip file with AES-256 - Standard WinZip/7z (not the old ZipCrypto!)
]
Expand All @@ -700,8 +700,6 @@ class ZipAES(ZipEncryptedFileBase):
extensions = ZipEncryptedFileBase.extensions + [
'.old.zip', # Zip file with old old ZipCrypto - reading/decrypting (writing not supported/implemented)
]
_filename = 'encrypted.md' # filename inside of (AES encrypted) zip file
_compression = ZIP_DEFLATED

def read_from(self, file_object):
# TODO catch exceptions and raise PurenTonboException()
Expand Down

0 comments on commit 96f43ea

Please sign in to comment.