Detect if Zip file is password protected

4 posts, 1 answers
  1. Yoshiaki
    Yoshiaki avatar
    4 posts
    Member since:
    Apr 2014

    Posted 23 Jun Link to this post

    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.

     

  2. Answer
    Tanya
    Admin
    Tanya avatar
    560 posts

    Posted 27 Jun Link to this post

    Hi Yoshiaki,

    A similar option is currently not available in ZipLibrary. We have it logged as a feature request in our public portal and you can vote for the implementation as well as subscribe to track its status using the related feedback item.

    Regards,
    Tanya
    Progress Telerik

  3. Yoshiaki
    Yoshiaki avatar
    4 posts
    Member since:
    Apr 2014

    Posted 09 Jul in reply to Tanya Link to this post

    Hi Tanya,

    Thank you for you for confirming that this function is not available yet. I need it in my project urgently but I'm still looking forward in implementing this function in the future. 

    Best Regards

     

  4. Tanya
    Admin
    Tanya avatar
    560 posts

    Posted 10 Jul Link to this post

    Hi Yoshiaki,

    Make sure you cast your vote for this functionality using the Like button of the item. Through the Follow this item button you can subscribe to receive notifications when the status of the task changes.

    Regards,
    Tanya
    Progress Telerik

Back to Top