views:

18

answers:

1

I have used ZipArchive library to zip and unzip files, but it doesn't give a clue about how to check if the zip file is password-protected. I need to be able to check whether a .zip file is password-protected. If it is, I will prompt the user for a password; otherwise just unzip it.

Anyone have an idea of how to check this? Is there an encryption bit on the file that I can test for? If so, how would I do it? Thanks.