I created a zip file with winrar, using the password "monkey" for a single file.
I open this zip file using minizip, but it produces an error when trying to read the file: if (unzOpenCurrentFilePassword(zip,"monkey")==UNZ_OK) ok = true;
Do you really just give it the raw password, or is there something else I have to do to make this work?
I look through the crypt.h file which contains the decryption functions envoked by unzOpenCurrentFilePassword() and it appears to only support traditional zip password protection not the newer AES encryption version.
This code is a modified version of crypting code in Infozip distribution
The encryption/decryption parts of this source code (as opposed to the
non-echoing password parts) were originally written in Europe. The
whole source package can be freely distributed, including from the USA.
(Prior to January 2000, re-export from the US was a violation of US law.)
This encryption code is a direct transcription of the algorithm from
Roger Schlafly, described by Phil Katz in the file appnote.txt. This
file (appnote.txt) is distributed with the PKZIP program (even in the
version without encryption capabilities).
If you don't need crypting in your application, just define symbols
NOCRYPT and NOUNCRYPT.
This code support the "Traditional PKWARE Encryption".
The new AES encryption added on Zip format by Winzip (see the page http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong
Encryption is not supported.
*/
[/quote]