6

I know zipping files with ionic.zip like here:

using (var zip = new ZipFile())
{
    zip.Encryption = EncryptionAlgorithm.WinZipAes256;
    zip.Password = "123";
    zip.AddDirectory("/path/");
    zip.SaveProgress += Zip_ProgressBar;
    zip.Save("/path/");
}

But this code allows people to see encrypted files and folders names. What can I do to prevent archived (encrypted) file and folder names from appearing?

Habip Oğuz
  • 921
  • 5
  • 17
  • 3
    The zip format do not support encrypted filenames - but you can get the effect if you use two layers of zip files where the inner zip file is encrypted. – Ebbe M. Pedersen Jul 26 '19 at 09:35
  • 1
    I think you can use .NetZip firstly, and than [file encryption](https://ourcodeworld.com/articles/read/471/how-to-encrypt-and-decrypt-files-using-the-aes-encryption-algorithm-in-c-sharp). – Jack Daniels Jan 12 '20 at 07:23
  • similar question : https://unix.stackexchange.com/questions/289999/how-to-zip-directory-with-encryption-for-file-names – pdem Jul 24 '23 at 09:30

0 Answers0