如何解压缩 AES-256 加密的 zip 文件?
我正在开发一个 Android 应用程序,需要解压缩 AES-256 加密的 zip 文件,是否有任何库可以用来完成此任务?
我非常感谢任何指导或帮助。
I am developing an android application which requires to decompress an AES-256 encrypted zip files, is there any libraries out there that I can use to accomplish that?
I am greatly appreciative of any guidance or help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
zip4j,处理 Zip 文件的 java 库(开源,Apache License v2.0)。
http://www.lingala.net/zip4j/
您可以下载二进制文件、源代码和示例。
zip4j, java library to handle Zip files (Open source, Apache License v2.0).
http://www.lingala.net/zip4j/
You can download binary, sources and examples.
我最终使用了外部库 http://code.google.com/p/winzipaes/
它仅限于压缩/解压使用 AES-256 加密的 Zip 文件仅
,但至少它符合我的需要。
I ended up using an external library at http://code.google.com/p/winzipaes/
it's limited to compression/decompression Zip files encrypted with AES-256 ONLY
but at least it fits my need.
这取决于您对加密 zip 文件的编码。请更具体一些。
如果它压缩然后加密,那么您解压缩然后使用 java.util.zip.GZIPInputStream
It depends on you encoding of encrypted zip files. Be more specific please.
If its compress then encrypt then you decompress then decrypt the file using java.util.zip.GZIPInputStream
据我所知,AES 加密的 ZIP 文件是在几年前由 WinZip 首次引入的。
WinZip 主页上有 AES 加密 ZIP 文件与标准 ZIP 文件有何不同的详细说明:
http: //www.winzip.com/aes_info.htm
As far as I remember AES encrypted ZIP files were introduced some years the first time by WinZip.
On the WinZip home page there is a detailed explanation how the AES encrypted ZIP files differs from a standard ZIP file:
http://www.winzip.com/aes_info.htm
我正在使用普通的 JRE。使用 http://www.lingala.net/zip4j/ 以下代码可以解密 zip文件:
I am working on a normal JRE. Using http://www.lingala.net/zip4j/ the following code works to decrypt a zip file:
我面临类似的问题,并进行了大量搜索并测试了所有这些解决方案,但它们对我没有帮助。
最后,我找到了一个解决方案,我想在这里分享它也许可以帮助其他人。
就我而言,我有一个 AES-256 加密的 zip 文件。
当我使用 zip4j 的最新版本时,我遇到了这个异常:
zip4j 代码:
之后我测试了 winzipaes,遇到了这个错误:
winzipaes 代码:
最后,我找到了 Sevenzipjbind,它对我有用。
最终代码:
I face a similar problem and searched a lot and tested all these solutions but they didn't help me.
Finally, I found a solution and I want to share it here maybe it can help others.
In my case, I have a AES-256 Encrypted zip file.
When I used the last version of zip4j, I faced this exception:
zip4j code:
After that I tested winzipaes and I faced this error:
winzipaes code:
Finally, I find sevenzipjbind and it works for me.
Final code:
我还没有测试过,但前段时间我发现了这个。
我希望它能帮助你
I don't have tested it yet, but some time ago I found this.
I hope it can help you