Closed StevenChristy closed 10 years ago
Nevermind, I just realized that I read this ( http://www.winzip.com/aes_info.htm ) wrong. 2 is not a vendor-specific ID its an indication that the CRC is calculated differently. Strangely removing the test worked, but I don't know what the consequences of that are yet so removing the test is not a good idea after all.
Nice work putting all this together. I encountered only one small issue trying to use this library. My 7zip AES encrypted zip file would not unzip properly. I traced the problem down to unz64local_GetCurrentFileInfoInternal.
Lines:
The code tests if vendor id != 1 and if so it returns an error. Just my opinion, but I think the test should be removed entirely. Otherwise it should be noted that 7zip is compatible and uses 2 so the test could be changed to be uL != 1 && ul != 2.
If safety is the concern, one is probably better off making sure that file_info_internal.aes_encryption_mode and file_info_internal.aes_compression_method are being set to valid values rather than checking the vendor id. Just my opinion though.