1
votes

It is important that the zip file should be password protected and not the files contained inside the zip. It means that when I double-click on the zip file it should ask me the password before showing the contents of the zip.

I have tried Zip4j and Winzipaes libraries but they both encrypt the content files inside the zip, not the zip itself. I have also tried several answers from Stackoverflow but to no avail. Please help.

1
Zip format doesn't have this feature at all. You will have to use some other format, for example 7z or ARC. - TheJavaGuy-Ivan Milosavljević

1 Answers

2
votes

As stated here by WinZip, the Zip format encrypts the files inside the archive only and not the zip itself. http://kb.winzip.com/kb/entry/147/

However, as the article suggests, double zipping the archive will hide files inside the inner zip file. As long as you encrypt the outer archive.