Closed GoogleCodeExporter closed 9 years ago
Some hints should solve your problem:
1. If you want to add all entries of the input (zip) file, you have to use
enc.addAll("windiff.zip") instead of enc.add("windiff.zip"). When using the
latter, your simply add the windiff.zip file to the new archive and encrypt it.
2. When using the instance methods of AesZipFileEncrypter you have to call
close() when you've added files you wanted to add to close the new archive.
3. If you only want to zip+encrypt one file, you can use the following static
method:
AesZipFileEncrypter.zipAndEncrypt( inFile, encFile, "abcdef" );
But coming back to 1.: If you want to encrypt the contents of an existing zip
file (encrypt all of the files it contains): use enc.addAll() + close()
Original comment by olaf.merkert
on 16 Aug 2010 at 6:13
Thanks Olaf that was really helpful!! its working now
i have two questions:
1. does it support files placed in folders for e.g: src/code/somefile.java
2. is it encrypting the content of each file or each file is just password
protected?
Thanks
Regards,
AB
Original comment by adilsa...@gmail.com
on 17 Aug 2010 at 7:33
getting this Exception "Exception in thread "main"
java.io.FileNotFoundException:
C:\adil\windiffziptest\winzipaes_src_20100806\WEB-INF\web.xml_TMP.zip (The
system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
" when decrypting zipfile which holds files in directories, one file is placed
in root and other in subdirectory i.e :winzipaes_src_20100806\WEB-INF\web.xml
also attaching encrypted zip file. Thnaks!!
Original comment by adilsa...@gmail.com
on 17 Aug 2010 at 9:10
Attachments:
Original issue reported on code.google.com by
adilsa...@gmail.com
on 16 Aug 2010 at 3:34Attachments: