This project is read-only.

How can I password protect the whole .zip file and not each file

Dec 16, 2016 at 1:38 AM

I have been working with this class on many C# projects.

But for my current project, I would like to have a password only on main say file.

Not on each zip within this file, since it would not be a good user experience to have to input the same password or different one on each file with the file.

My current testing code.
using (ZipFile zip = new ZipFile())
                zip.Password = "123456!";
                zip.AddFile(@"C:\Temp\ReadMe.txt"); // no password for this one

So, when you unzip this file, you can see each file, but if you want to read, edit, you will be prompted for the password.

I would like you to have to enter the password once and then have access to any file.