I need a way to test to see if a zip archive is encrypted (ex. object.IsEncrypted), ziparchive doesn’t have a property or method that does this; however zippedfile does. The problem with this is that when I create a zippedfile object, you have to explicitly state a file within the encrypted file (zippedfile constructor overload list doesn’t have a method that only requires an AbstractFile object and nothing else) which cannot be known if the zip file is encrypted, is there a workaround to this problem, and if so, what is it. Thanks in advance
Imported from legacy forums. Posted by Danny (had 1785 views)
Unfortunately, it is not possible to check whether a zip file is encrypted without retrieving the contents in the archive. In the Zip format, each item is encrypted (or not) individually. One item may be encrypted, and the next one may not be. Thus, there is no global encryption flag or other such concepts.
Imported from legacy forums. Posted by Mohamed [Xceed] (had 1473 views)