Coder Social home page Coder Social logo

Comments (4)

sepehr1014 avatar sepehr1014 commented on August 29, 2024

Any plans on adding this functionality?

from sharpcompress.

ptallett avatar ptallett commented on August 29, 2024

Its fairly easy to hack this. I just put a static string in the lower level class and a set method in the high level API. Not something I’m proud of though, so I didn’t check it in! :)

Cheers,

Paul

From: Sepehr Mohammad [mailto:[email protected]]
Sent: Sunday, May 31, 2015 10:49
To: adamhathcock/sharpcompress
Cc: ptallett
Subject: Re: [sharpcompress] Not possible to supply a password when using the high level interfaces (#37)

Any plans on adding this functionality?


Reply to this email directly or view it on GitHub #37 (comment) . https://github.com/notifications/beacon/AJ1R_ZJ-1emnOasyNrm8k2yfHfDAOJbeks5oOtCRgaJpZM4DMah1.gif

from sharpcompress.

sepehr1014 avatar sepehr1014 commented on August 29, 2024

Thanks @ptallett but in our situation, we don't know if the files are password protected beforehand. There needs to be an event which is raised on password protected archives to get the password and continue extracting.

from sharpcompress.

ptallett avatar ptallett commented on August 29, 2024

Yes, that would be ideal, but you can workaround it by trying to open the ZIP file without a password, catching the exception, requesting a password, then retrying to open the ZIP file. Works a treat. You need to do something similar if the password is incorrect in any case.

The drawback with this approach is each file in a ZIP container can have a different password, but I just ignored that scenario as its rare.

Cheers,

Paul

From: Sepehr Mohammad [mailto:[email protected]]
Sent: Sunday, May 31, 2015 12:12
To: adamhathcock/sharpcompress
Cc: ptallett
Subject: Re: [sharpcompress] Not possible to supply a password when using the high level interfaces (#37)

Thanks @ptallett https://github.com/ptallett but in our situation, we don't know if the files are password protected beforehand. There needs to be an event which is raised on password protected archives to get the password and continue extracting.


Reply to this email directly or view it on GitHub #37 (comment) . https://github.com/notifications/beacon/AJ1R_cZI5fKKhyK6qAn62WW8EqO1AIr7ks5oOuPkgaJpZM4DMah1.gif

from sharpcompress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.