Comments (4)
Any plans on adding this functionality?
from sharpcompress.
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.
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.
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)
- Target Frameworks HOT 1
- Library-wise exception type HOT 2
- WriteEntryToDirectory with GZipReader fails HOT 4
- Large folder (> 3Gib) throws exception "Stream was too long" HOT 1
- Tar: Missing support for Pax extended file headers
- False positive in tar detection HOT 1
- Problem with Microsoft.SourceLink.GitHub dependency HOT 10
- Suggestion: Work with open files HOT 1
- root folder in zip HOT 2
- security policy HOT 4
- Hang while opening BZip2 HOT 4
- HttpBaseStream Gzip extract - NotSupportedException HOT 4
- Unable to open a certain rar file HOT 1
- `GZipArchive`s created from a stream have `ArchiveType` set to `Tar` instead of `GZip` HOT 1
- Add LongLink Support to Tar reading
- Problems discovered while decompressing PosrgresSQL HOT 4
- OS specific invalid characters are causing extraction to corrupt file HOT 7
- Reading a rar stream from a rar file gets NotSupportedException Specified method is not supported HOT 1
- compatibility with non-standard zip formats HOT 3
- How to quickly modify the file name in a zip file, as there is only one file in a zip file. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpcompress.