I use DotNetZip for zip file in c#. and i can create zip file with password with this code:
using (ZipFile zip = new ZipFile()
{
zip.Password = "password";
zip.AddDirectory(path);
zip.Save(outputPath);
}
I with using this code zip file my directory or file. but i want set password in my zip file.
So, I using this code:
using (ZipFile zip = new ZipFile("MyFile.zip")
{
zip.Password = "password";
zip.Save();
}
but it's not working.