I'm not sure what you need, but if you want to have password protected zip files, you can use this library : Here are some code snippets taken from there:
Zip:
ZipArchive zipArchive = new ZipArchive(); zipArchive.zip(targetPath,destinationPath,password);
Unpack:
ZipArchive zipArchive = new ZipArchive(); zipArchive.unzip(targetPath,destinationPath,password);
Milad faridnia
source share