客户端Web应用程序中的GPG(PGP)解密 [英] GPG (PGP) decryption in client side web applications
本文介绍了客户端Web应用程序中的GPG(PGP)解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在网络应用程序的客户端解密一些加密数据?
How would I be able to decrypt some encrypted data on the client side of a web application?
例如。
- 数据在服务器上加密存储。
- 使用公共GPG密钥加密。
- 服务器将加密的密钥发送给客户端。
- 客户端需要使用其本地私钥解密。
- The data is stored encrypted on the server.
- It was encrypted using a public GPG key.
- The server sends the encrypted to the client.
- The client needs to decrypt it using their local private key.
我可以将私钥传递给浏览器,使用Javascript解密数据。
Assumably I would be able to pass the private key to the browser and use Javascript to decrypt the data.
推荐答案
如果你想坚持使用JavaScript,那么看看LGPL库 OpenPGP.js 。
If you want to stick with JavaScript, then have a look at the LGPL library OpenPGP.js.
这篇关于客户端Web应用程序中的GPG(PGP)解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文