JAVA: ZIP file protected with password (I know it)
|
Hi, How to open a ZIP file for reading/writting protected with password (I know the password for that file)? Should I use java.util.zip?HOW? Should I use java.security.KeyStore?HOW? Please Help,..as fast as possible THANKS YoGa |
Re: JAVA: ZIP file protected with password (I know it)
Link |
by
![]() |
instead of java, you could use the unix command line tool zip. the -e command line argument allows you to encrypt with a password. ![]() ![]() ![]() |
Re: JAVA: ZIP file protected with password (I know it)
Link |
by
![]() |
If you're using Windows, whatever gave you the idea for using the Java utility set? Just download a zip utility like WinRAR. It should ask you for the password when you open the file and then you can treat it like any other zip file. |
Re: JAVA: ZIP file protected with password (I know it)
Link |
by
![]() |
If you are programming an application using Java that would have to be able to input/output password protected ZIP files you are out of luck. The java.util.zip package doesn't support passwords. Although there seems to be a workaround. Look around on Google, maybe there is some other non sun package that has a password feature. As for java.util.KeyStore I dunno... Maybe if you use a combination of the two packages you could make a zip file password protected but it will probably not be compliant with other unzip software. Or indeed just make unix command calls from your Java code using java.lang.Runtime, this is only if you run some kind of UNIX flavored OS though.
[Quiet dogs know when to be silent]
Sheep & Tiojar's Anime Episodes |
Re: JAVA: ZIP file protected with password (I know it)
Link |
by
![]() |
*Smacks self for being stupid* Ah, or perhaps there is another language that does support encryped compression that you could use to make a helper exe for your program. (Surely there's a name for that, I'm just not familiar with the real programming community) |