jQuery in Action, 3rd edition
The moose likes Security and the fly likes How create encrypted/password-protected zip file? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "How create encrypted/password-protected zip file?" Watch "How create encrypted/password-protected zip file?" New topic

How create encrypted/password-protected zip file?

Robert Paris
Ranch Hand

Joined: Jul 28, 2002
Posts: 585
Any idea if there's a way with the Java API to create an encrypted and password-protected ZIP file? I know how to create a zip file with Java, but I need encryption and password protection.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
Let's move this to the Security forum and see if anyone over there has a clue.

"JavaRanch, where the deer and the Certified play" - David O'Meara
Jon Dornback
Ranch Hand

Joined: Apr 24, 2002
Posts: 137
i haven't attempted this, but if you can already programmatically create the zip file, you could then use the java.security and javax.crypto classes to encrypt the zip file using password based encryption (PBE). this would make it a two stage process, but it's a start. PBE info and example at:

use the [CODE] tags - it makes it much easier for people to help you.
I agree. Here's the link: http://aspose.com/file-tools
subject: How create encrypted/password-protected zip file?
It's not a secret anymore!