now let’s think we got a random zip file so how do I know that file is password protected?
cause there ain’t a method like
bool IsPasswordProtected(string fileName);
I am asking this cause there are couple of methods to extract entries from a zip file
but still I have to use either Extract() or ExtractWithPassword()
but to use this I have to know the file that I am going to extract is actually password protected or not. I know the password applies to the entries not to the zip file itself.
I checked every methods in the documentation but I couldn’t find a suitable method to solve this issue or did I miss something?
Thanks.!
Check the
ZipEntry.UsesEncryptionproperty.