1

I already have one byte[] for zip file in memory. Now I want encrypt it, when user download it, it can be open use a tools like winRAR and enter the password.

I've tried zip4j, btu it does not support stream.

How can I do it?

Radim Köhler
  • 122,561
  • 47
  • 239
  • 335
coffee
  • 97
  • 2
  • I think you can find more info here: http://stackoverflow.com/questions/166340/write-a-password-protected-zip-file-in-java – maqjav Jun 25 '13 at 05:40
  • thank you! I find out the solution on this page http://code.google.com/p/encrypt-zip-as3-java/source/browse/trunk/EncryptZip/src/nochump/util/extend/ZipOutput2Flex.java – coffee Jun 25 '13 at 07:43
  • Hi coffee, and welcome to stackoverflow (a bit late, but better late then never :) ). You can post your solution as an answer to your own question. It seems separate from the link that maqjav posted, so it's fine to stand on its own, especially if the zip was already in memory... – Maarten Bodewes Jun 26 '13 at 22:45

0 Answers0