Only entries added after setting the Password property will be applied to the password. To protect the directory that you are adding, simply set a password before calling AddDirectory .
using (ZipFile zip = new ZipFile()) { zip.Password = "password"; zip.AddDirectory(path); zip.Save(outputPath); }
Please note that this is due to the fact that passwords in Zip files are placed in the records inside the Zip file, and not in the Zip files themselves. This allows you to protect some of your zip files and some not:
using (ZipFile zip = new ZipFile()) {
source share