Create password protected archives #37

Open
opened 2026-01-29 22:03:47 +00:00 by claunia · 14 comments
Owner

Originally created by @sepehr1014 on GitHub (May 31, 2015).

How can we set password when creating archives?

Originally created by @sepehr1014 on GitHub (May 31, 2015). How can we set password when creating archives?
Author
Owner

@sepehr1014 commented on GitHub (Jun 18, 2015):

If this can't be done, can you point out which parts need to be modified in order to implement this feature?

@sepehr1014 commented on GitHub (Jun 18, 2015): If this can't be done, can you point out which parts need to be modified in order to implement this feature?
Author
Owner

@sepehr1014 commented on GitHub (Jul 7, 2015):

@adamhathcock It seems this project is not actively maintained. We're working on a big project and we had plans to use SharpCompress as part of it ...

@sepehr1014 commented on GitHub (Jul 7, 2015): @adamhathcock It seems this project is not actively maintained. We're working on a big project and we had plans to use SharpCompress as part of it ...
Author
Owner

@adamhathcock commented on GitHub (Jul 7, 2015):

I'm still here but I'm not actively working on it. Others have contributed and asked questions and I try to answer them. However, my focus is elsewhere at the moment.

As far as creating passwords, you'd probably want to modify the WriterFactory, as a starting point, to take the password. Then implement it on ZipWriter or other writers. Then the ArchiveFactory would do the same.

@adamhathcock commented on GitHub (Jul 7, 2015): I'm still here but I'm not actively working on it. Others have contributed and asked questions and I try to answer them. However, my focus is elsewhere at the moment. As far as creating passwords, you'd probably want to modify the WriterFactory, as a starting point, to take the password. Then implement it on ZipWriter or other writers. Then the ArchiveFactory would do the same.
Author
Owner

@alex4998 commented on GitHub (Sep 23, 2016):

I just reviewed the code. As far as I understand it is a matter of using PkwareTraditionalCryptoStream in the streams chain for writing data. It is, of course, if that class is fully implemented for encryption. I see this question was asked long ago. I need this too. Did somebody already did it or started doing it? I'm thinking about implementing this part but I would like to avoid double work and reuse what's already done but not added to the project. Please, let me know.

@alex4998 commented on GitHub (Sep 23, 2016): I just reviewed the code. As far as I understand it is a matter of using PkwareTraditionalCryptoStream in the streams chain for writing data. It is, of course, if that class is fully implemented for encryption. I see this question was asked long ago. I need this too. Did somebody already did it or started doing it? I'm thinking about implementing this part but I would like to avoid double work and reuse what's already done but not added to the project. Please, let me know.
Author
Owner

@adamhathcock commented on GitHub (Sep 23, 2016):

I doubt anyone is working on it. Please do and submit a pull request :)

@adamhathcock commented on GitHub (Sep 23, 2016): I doubt anyone is working on it. Please do and submit a pull request :)
Author
Owner

@dos-ise commented on GitHub (Jul 17, 2017):

Has there been any progress on this? I would need this feature....

@dos-ise commented on GitHub (Jul 17, 2017): Has there been any progress on this? I would need this feature....
Author
Owner

@adamhathcock commented on GitHub (Jul 17, 2017):

You’re welcome to add it yourself.

@adamhathcock commented on GitHub (Jul 17, 2017): You’re welcome to add it yourself.
Author
Owner

@dos-ise commented on GitHub (Jul 17, 2017):

I have tried something. But having problems with the encryption data :/
You can take a look at it under -> Commit 2482769e

@dos-ise commented on GitHub (Jul 17, 2017): I have tried something. But having problems with the encryption data :/ You can take a look at it under -> Commit 2482769e
Author
Owner

@dos-ise commented on GitHub (Jul 26, 2017):

Did you take a look at my commit?

@dos-ise commented on GitHub (Jul 26, 2017): Did you take a look at my commit?
Author
Owner

@adamhathcock commented on GitHub (Jul 26, 2017):

I didn't because I'm on vacation and I have no idea how to view whatever you're referring to.

Please, make a pull request if you have something for review.

@adamhathcock commented on GitHub (Jul 26, 2017): I didn't because I'm on vacation and I have no idea how to view whatever you're referring to. Please, make a pull request if you have something for review.
Author
Owner

@dos-ise commented on GitHub (Jul 27, 2017):

Forget that :)

@dos-ise commented on GitHub (Jul 27, 2017): Forget that :)
Author
Owner

@adamhathcock commented on GitHub (Jul 27, 2017):

Sorry, I would really like a diff. Pull Requests do work with a proper fork of the repo.

@adamhathcock commented on GitHub (Jul 27, 2017): Sorry, I would really like a diff. Pull Requests do work with a proper fork of the repo.
Author
Owner

@dos-ise commented on GitHub (Jul 27, 2017):

https://github.com/adamhathcock/sharpcompress/pull/284

now it has worked ^^
I'm just stupid :)

@dos-ise commented on GitHub (Jul 27, 2017): https://github.com/adamhathcock/sharpcompress/pull/284 now it has worked ^^ I'm just stupid :)
Author
Owner

@Looooong commented on GitHub (Mar 18, 2021):

Is there any problem on the zip_encryption branch? Perhaps I can look into it.

@Looooong commented on GitHub (Mar 18, 2021): Is there any problem on the [zip_encryption](https://github.com/adamhathcock/sharpcompress/tree/zip_encryption) branch? Perhaps I can look into it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#37