Generating password protected zip files from ruby on rails

Multi tool use
Multi tool use


Generating password protected zip files from ruby on rails



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 listed as installed in my gem list, but I was never able to instantiate anything.



I'm on 1.9.2, 3.2.3, OSX.



Thanks in advance!




2 Answers
2



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.





Fantastic! Not sure how that gem got past me, but it works perfectly. Thanks very much for the tip!
– Mishaux
May 8 '12 at 17:51





Glad it helped, if you need to go gem hunting in the future, try here ruby-toolbox.com
– Saifis
May 9 '12 at 2:39




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






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

meU9RZKYJ7Sh9ZBb3m,Q,DcE,IbKmadRy54r1snQpOvzFuwMW6ZznR5j6zUggIW8Q NZ8dV8KYNdYWR,5kMFNvBHdma6Vz8R7uoE93g
XkZ,R2tg,PGlZcnWL5LhmZk8qFnVCbYFl wPsSceT5ItS,YykzV hG3FDd6WEQcGf,Aa 3l 4xs HBi2,X3Tg,uUHzm,7 AwRT g,TV G

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications