Archived Forum Post

Index of archived forum posts

Question:

get_Crc() is nonzero for CkZip aes entries

May 06 '14 at 11:31

Bug or feature?

According to the CkZipEntry docs, the ::get_Crc() method should return 0 for AES encrypted entries. AES zip entries produced using CkZip itself, does NOT have this property however:

    CkZip zip;
    zip.UnlockComponent("something");
    zip.NewZip("stuff.zip");
    zip.put_EncryptPassword("secret");
    zip.put_Encryption(4);
    zip.AppendFiles("somefile.dat", false);
    zip.WriteZipAndClose();
    // read the encrypted file
    zip.OpenZip("stuff.zip");
    assert (zip.get_Encryption() == 4); // ok, file is aes encrypted!
    CkZipEntry *aesEntry = zip.GetEntryByIndex(0); // the one and only entry
    if (aesEntry) {
       assert (aesEntry->get_Crc() == 0) // assertion failed!
       delete aesEntry;
     }

Either the documentation should be changed or (better yet) the CkZip AES encryption code should be fixed to set the CRC32 to zero.

/Sune


Answer

This is fixed now in v9.5.0.38.

See http://www.cknotes.com/v9-5-0-38-micro-update-trustedroots-objectclass-added-and-other-various-fixes/

Please tell me the exact build you require..