• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to unzip password protected zip file in java?

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at https://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 ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
Bartender
Posts: 1952
7
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did I just hear you volunteer Jelle?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rob Prime:
Did I just hear you volunteer Jelle?



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