login about faq


I’m trying to find a way (using CkZip and/or CkZipEntry) to detect if a given zip file is aes encrypted and if I have the correct password.

If was hoping I could do something like;

CkZip zip;

if (zip.get_Encryption() == 4 && zip.VerifyPassword()) {
 // encrypted zip validated….
} else {
 // not encrypted or wrong pw

However the get___Encryption() method only seems to return 4 for specific implementations of aes zip. In my scenario, the .zip file comes from 7zip using AES-256 encryption. It decrypts just perfectly with CkZip, but get_Encryption() returns 0 nevertheless.

VerifyPassword() by itself returns true for non-encrypted zips also, so it’s only useful once you know the file is encrypted.

Another possibility is the CkZipEntry get_Crc() method which returns zero for aes encrypted entries, but that could happen by chance also (for example if the file is empty).

Any suggestions?


asked Nov 20 '13 at 08:31

sune's gravatar image


Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Nov 20 '13 at 08:31

Seen: 2,197 times

Last updated: Nov 20 '13 at 08:31

powered by OSQA