Hi,
I'd like to ask if there are ways to detect if the zip file is password protected. Just to give you a background of what I want to accomplish. I have a application that extract zip files. Zip files may be password protected and/or not password protected. By doing that, I will know if I will prompt a dialog box so that the user will enter the zip file password.
Initially, I tried to extract the file without the Encryption parameter to test if it can be extracted. Unfortunately, the files still get extracted only that it contains some funny characters.
using (ZipArchive zip = new ZipArchive(stream))
{
foreach (ZipArchiveEntry e in zip.Entries
{
using (Stream sw = File.Create(Path.Combine(FileDestination, e.FullName)))
{
Stream enterySTream = e.Open();
Telerik.WinControls.Zip.Extensions.ZipFile.CopyStreamTo(enterySTream, sw);
sw.Flush();
}
}
}
I have the latest Winforms Telerik version installed.
Thank you.