Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Encryption with AES

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20078 |

    Hi,

    Due to strict security requirements, I need to use the AES feature. My questions are:

    a. What other ZIP clients, besides WinZip 9 and 10, will be able to open the resultant ZIP file?

    b. Which ZIP format is the resultant ZIP file: 4.5 or 5.2 or others?

    Thanks in advance.

    Imported from legacy forums. Posted by Sing Chyun (had 3061 views)

    User (Old forums)
    Member
    Post count: 23064

    a. You will need to verify yourself, but most likely 7-Zip and PKWare, and certainly others.

    b. format is 4.5 because of the Zip64 feature.

    Imported from legacy forums. Posted by André (had 527 views)

    User (Old forums)
    Member
    Post count: 23064

    Thank you. I’m trying out the 45-day trial using the following code snippet:

    AbstractFile file = new DiskFile(@"d:\mytest.zip");
    if (file.Exists) { file.Delete(); }
    ZipArchive archive = new ZipArchive(file);
    archive.DefaultEncryptionMethod = EncryptionMethod.WinZipAes;
    archive.DefaultEncryptionStrength = 256;
    archive.DefaultDecryptionPassword = "This is a trial password";
    AbstractFolder source = new DiskFolder(@"d:\temp\small");
    source.CopyFilesTo(archive, true, true);

    Strangely the resultant ZIP file is not encrypted and can be opened without supplying any password. Is anything missing from the code?

    Imported from legacy forums. Posted by Sing Chyun (had 1203 views)

    User (Old forums)
    Member
    Post count: 23064

    Found the bug.

    archive.DefaultDecryptionPassword = "This is a trial password";

    should be replaced by 

     archive.DefaultEncryptionPassword = "This is a trial password";

    Imported from legacy forums. Posted by Sing Chyun (had 3921 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.