• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How create encrypted/password-protected zip file?

 
Robert Paris
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's move this to the Security forum and see if anyone over there has a clue.
 
Jon Dornback
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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:
http://java.sun.com/products/jce/doc/guide/API_users_guide.html#PBE
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic