javanthropus / archive-zip

A simple Ruby-esque interface to creating, extracting, and updating ZIP archives in 100% Ruby.
https://rubygems.org/gems/archive-zip
MIT License
83 stars 10 forks source link

can I use AES-256 encription to encrypt zip password? #21

Open mnosuk opened 6 years ago

mnosuk commented 6 years ago

Hi there,

we try to use archive-zip and set password for my-zip as a following code below

Archive::Zip.archive( File.join(zip_name), File.join(file_path, file_name), encryption_codec: Archive::Zip::Codec::TraditionalEncryption, password: file_name.gsub(/.csv/, '') )

actually, i dont know what TraditionalEncryption is?

and how can I use AES-256 encryption?

thanks in advance.

javanthropus commented 6 years ago

Traditional encryption is a rather weak encryption codec that is the first one supported in ZIP files as I recall. Unfortunately, I never got around to adding the more interesting codecs; however, this library is plugable (you can write your own codec class and use it with the encryption_codec parameter), and I'm also willing to take PRs to add additional functionality.