Generating password protected zip files from ruby on rails

前端 未结 2 875
失恋的感觉
失恋的感觉 2021-01-20 22:05

Has anyone had any luck creating password protected zip files in rails?

I spent a bunch of hours trying to get Chilkat\'s 64 bit linux gem working on OSX. I got it l

相关标签:
2条回答
  • 2021-01-20 22:23

    Now, it is possible using RubyZip library. Note, as of now, it's marked as "Experimental". But, it works. Also note, AES Encryption is not yet supported.

    https://github.com/rubyzip/rubyzip#password-protection-experimental

    0 讨论(0)
  • 2021-01-20 22:30

    Have you tried ZipRuby? It seems to have an encryption method.

    Zip::Archive.encrypt('filename.zip', 'password')
    

    Sorry haven't tried it myself so can't be absolutely sure.

    0 讨论(0)
提交回复
热议问题