compress-tools-rs icon indicating copy to clipboard operation
compress-tools-rs copied to clipboard

Support encryption?

Open zjzdy opened this issue 3 years ago • 3 comments

I want to uncompress archive with password. Is there a way to do it or is there any plan to do it?

zjzdy avatar May 25 '22 05:05 zjzdy

Not currently but we are open to accept a PR adding it.

otavio avatar May 25 '22 09:05 otavio

I'm studying ways to implement it, I just realized that it's not supported :( friends who are rust experts, I found an implementation using libarchive in python, I'll try to implement it, but I'll leave it here in case something wants to implement.

https://github.com/Changaco/python-libarchive-c/pull/109

edit1: i checked and did some tests and the implementation seems very simple, I will open a PR and soon I will add it here

alandeev avatar May 27 '23 10:05 alandeev

Thank you, @hivexdev. Please know that I am open to review and help with anything you need. Just let me know how I can be of assistance.

otavio avatar May 27 '23 13:05 otavio

@hivexdev news on your side?

otavio avatar May 30 '23 22:05 otavio

@otavio Sorry for the delay, I managed to implement it, but I ended up a little frustrated after I saw that libarchive does not support extracting encrypted files '.rar' format, I ended up leaving it aside, but anyway I opened the PR just by modifying the Iterator. I have another PR here that implements it in everything (I mean in the other extract functions besides ArchiveIterator), but it got a lot of changes and I didn't do the unit tests either, because of that I'm opening a PR just with the implementation in ArchiveITerator.

https://github.com/OSSystems/compress-tools-rs/pull/116

alandeev avatar May 31 '23 12:05 alandeev