OSSystems / compress-tools-rs

A Swiss Army Knife for handling compressed data in Rust
Apache License 2.0
77 stars 27 forks source link

Support encryption? #82

Open zjzdy opened 2 years ago

zjzdy commented 2 years ago

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

otavio commented 2 years ago

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

alandeev commented 1 year ago

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

otavio commented 1 year ago

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 commented 1 year ago

@hivexdev news on your side?

alandeev commented 1 year ago

@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