Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.0, 1.1
-
None
-
None
Description
Currently when the ZipArchiveInputStream or ZipFile encounters an encrypted zip it bails out with cryptic exceptions like: 'invalid block type'. I would like to have two things:
1. an 'encrypted' flag in the ZipArchiveEntry class. It would be taken from the first bit of the 'general purpose flag'
2. more descriptive error messages, both in ZipFile and ZipArchiveInputStream
It might be useful in case someone wants to implement proper support for encrypted zips, with methods to supply passwords/encryption keys and proper encryption/decryption algorithms.
For the time being I just need to know if a file is encrypted or not.
I will post a patch with a proposal of a solution in near future.