You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are JS libraries available for various encryption algorithms.
My understanding of how JSZip works is when I ask for a file to be loaded from the archive, it will automatically be decompressed for me.
I believe zip files are encrypted after they are compressed, so I will need to perform decryption before the decompression occurs.
Would it be possible to
Provide an option to allow encrypted archives (simple flag), provided that
We will be providing methods that will be executed BEFORE or AFTER the decompression occurs
So for example, I might set a beforeDecompress listener so that whenever async is called, it will grab the entry, run it through the callback, and then proceed to decompress it as usual.
My assumption is that the file directory can be read the same way as a zip archive without any encrypted entries.
The text was updated successfully, but these errors were encountered:
You are correct, the content is compressed then encrypted.
With a traditional PKWARE encryption, the header (needed to decrypt the file) is in the data section. With WinZip's AES encryption, the header is as an extra data of the entry. The metadata (local file headers, central directory) are only encrypted by PKWARE Strong Encryption but it's covered by a patent: we can ignore it.
JSZip uses internally a stream (async accumulates the result) but the idea is the same. This would need #248 (to get the header).
In that case, we could "register" an object with a supports(zip entry) method and a transform(data) method. The same could be done with the compression.
There are JS libraries available for various encryption algorithms.
My understanding of how JSZip works is when I ask for a file to be loaded from the archive, it will automatically be decompressed for me.
I believe zip files are encrypted after they are compressed, so I will need to perform decryption before the decompression occurs.
Would it be possible to
So for example, I might set a
beforeDecompress
listener so that wheneverasync
is called, it will grab the entry, run it through the callback, and then proceed to decompress it as usual.My assumption is that the file directory can be read the same way as a zip archive without any encrypted entries.
The text was updated successfully, but these errors were encountered: