使用 Javascript 解密受密码保护的 zip 文件 [英] Using Javascript to decrypt password protected zip file

查看:33
本文介绍了使用 Javascript 解密受密码保护的 zip 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个 chrome 扩展程序,当它在 Gmail 中检测到加密的 zip 文件时会激活该扩展程序.加密的 zip 包含一个 mp3 文件.zip 文件的密码是事先知道的.我希望 chrome 扩展使用已知密码解密文件并使用 Javascript 播放它.

I'm trying to create a chrome extension that activates when it detects an encrypted zip file in Gmail. The encrypted zip contains an mp3 file. The password for the zip file will be known before hand. I want the chrome extension to decrypt the file using the known password and play it using Javascript.

这是我第一次使用 Chrome 扩展程序,但我相信我知道如何编码除了 zip 文件的解密之外的所有内容.经过一番研究,我还没有发现如何使用现有的库(如 zip.js 或 jszip.js)来解密 zip 文件.

This is my first time working with Chrome extensions but I believe I know how to code everything except the decryption of the zip file. After some research, I haven't been able to discover how to use existing libraries (like zip.js or jszip.js) to decrypt the zip file.

任何帮助将不胜感激.谢谢!

Any help would be appreciated. Thanks!

推荐答案

我最终在客户端使用 CryptoJS 解密了文件.即使有 6 分钟以上的音频剪辑,它也非常有效.

I ended up decrypting the file using CryptoJS on the client side. Its surprisingly effective, even with 6+ min audio clips.

这篇关于使用 Javascript 解密受密码保护的 zip 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆