Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to unzip password protected zip file in java?

 
Giri Regu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am trying to unzip a password protected zip using java.util.zip package.
it throw an error "java.util.zip.ZipException: encrypted ZIP entry not supported".

is there any specific classes to unzip password protected zip file in java?

how can i make this works?

Thanks in advanced,
Giri
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at http://www.coderanch.com/t/276889/Streams/java/java-util-zip-password-protected

A Google search turned up IP*Works! Zip, commercial product by /n software
[ August 25, 2008: Message edited by: Mark Vedder ]
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In regards to the discussion Mark linked to, the built-in ZIP classes in the class library do not support password-protected ZIP files (and I'm not aware of a Java library that does).
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the other hand, the ZIP File Format Specification is well defined, so anyone with 'some' time to kill could extend the standard ZipInputStream / ZipOutputStream pair to support encryption. Java crypto supports AES, so that's like a head start
Of sorts.
[ August 25, 2008: Message edited by: Jelle Klap ]
 
Rob Spoor
Sheriff
Pie
Posts: 20606
60
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did I just hear you volunteer Jelle?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somehow I seem to remember that PKZIP and WinZIP use different but incompatible password schemes. Anyone know anything about that?
 
Jelle Klap
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rob Prime:
Did I just hear you volunteer Jelle?


Good point.
I'll shut up now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic