Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Standard Zip Encryption and Decryption #194

Closed
johnnyshields opened this issue Nov 30, 2014 · 1 comment
Closed

Support Standard Zip Encryption and Decryption #194

johnnyshields opened this issue Nov 30, 2014 · 1 comment

Comments

@johnnyshields
Copy link
Contributor

I would like to request to support Standard/Traditional Zip Encryption/Decryption in this library (sometimes called "ZipCrypto" or "Standard Encryption")

Currently there is a pull request here to support AES Decryption (AES is different than Standard encryption): #179

Requirements:

  • Refer to the Zip4j Java implementation of this functionality, which is quite good. Also Ruby library https://github.com/javanthropus/archive-zip supports it.
  • In particular we should add a /lib/crypto directory with standard_encrypter.rb and standard_decrypter.rb files that inherit from common encrypter.rb and decrypter.rb base classes, equivalent to IEncypter.java and IDecrypter.java in Zip4j, so that additional encryption types may be added in the future. Note that this structure is not present in the current work on Add support for reading ZIP files utilising AES encryption #179.
  • Must work with RubyZip's input and output streams methods. E.g. something like:
      Zip::OutputStream.write_buffer do |out|
        out.put_next_entry("my_filename.csv", password: "foobar", encryption: "standard")
        out.write @my_csv_file
      end
  • Code should be clean and must include README and unit/integration test cases. If you refer to Add support for reading ZIP files utilising AES encryption #179 there was some discussion about how the cases should be written using fixtures zip files. We should also add a roundtrip test case (encrypt then decrypt)
  • Output file must be able to be opened in standard Windows XP/7/8 without a third-party lib like 7zip.
@johnnyshields johnnyshields changed the title Support AES Encryption and Decryption Support Standard Zip Encryption and Decryption Nov 30, 2014
@hainesr
Copy link
Member

hainesr commented Jul 10, 2021

As far as I can see Rubyzip now supports ZipCrypto style encryption/decryption.

@hainesr hainesr closed this as completed Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants