在Java中编写受密码保护的Zip文件 [英] Write a password protected Zip file in Java
问题描述
这需要由第三方打开,所以密码保护需要使用标准工具。 >
经过多次搜索,我发现了三种方法:
可用的一套源代码,适合单个文件zip。但是,没有许可证。用法是AesZipOutputStream.zipAndEcrypt(...)。
http://merkert.de/de/info/zipaes/src.zip
( https://forums.oracle.com/论坛/ thread.jspa?threadID = 1526137 )
更新:此代码现在是Apache授权并在 http://code.google.com/p/winzipaes/ 。它为我工作(在zip中有一个文件),并且很好地填充了Java的开源库中的一个洞。
商业产品(写作时为500美元)。我无法验证是否有效,因为他们的试用许可证方法很复杂。它也是一个移植的.NET应用程序:
http://www.nsoftware.com /ipworks/zip/default.aspx
商业产品(写作时为290美元)。仅适用于Wnidows,因为它使用dll:
http://www.example -code.com/java/zip.asp
I need to zip and password-protect a file. Is there a good (free) library for this?
This needs to be opened by a third party, so the password protection needs to work with standard tools.
After much searching, I've found three approaches:
A freely available set of source code, suitable for a single file zip. However, there is no license. Usage is AesZipOutputStream.zipAndEcrypt(...). http://merkert.de/de/info/zipaes/src.zip (https://forums.oracle.com/forums/thread.jspa?threadID=1526137)
UPDATE: This code is now Apache licensed and released at http://code.google.com/p/winzipaes/ . It worked for me (one file in the zip), and fills a hole in Java's opens source libraries nicely.
A commercial product ($500 at the time of writing). I can't verify if this works, as their trial license approach is complex. Its also a ported .NET app: http://www.nsoftware.com/ipworks/zip/default.aspx
A commercial product ($290 at the time of writing). Suitable only for Wnidows as it uses a dll: http://www.example-code.com/java/zip.asp
这篇关于在Java中编写受密码保护的Zip文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!