openpgp.js

JavaScript: Decrypt content of GnuPG encrypted files using openpgp.js

允我心安 提交于 2019-12-21 17:23:09
问题 I'm trying to write a sample decryptor for GnuPG encrypted files in JavaScript using openpgp.js. So I tried it naively without even asking if it is even possible. I made the following page. popup.html <!doctype html> <!-- --> <html> <head> <title>Popup</title> <script src="openpgp.js"></script> <script src="popup.js"></script> </head> <body> <p>Upload message: </p><input id="message" type="file"/><br> <p>Upload secret key: </p><input id="secret" type="file"/><br> <p>Secret key password: </p>

mscorlib: Error: Cannot find module 'crypto' after using Webpack on an application

我与影子孤独终老i 提交于 2019-12-14 02:29:21
问题 I've got a project which utilizes the openpgpjs library as a dependency, and I'm WebPacking up this whole application for deployment on an Azure Functions to resolve cold start issues. The Azure functions work fine when running locally in a non-Webpacked format, but as soon as I WebPack up the files I keep getting the error at runtime: "mscorlib: Error: Cannot find module 'crypto'" The code which is triggering this error appears to be from Openpgpjs's util.js. This whole file is here: https:/

JavaScript: Decrypt content of GnuPG encrypted files using openpgp.js

好久不见. 提交于 2019-12-04 08:56:10
I'm trying to write a sample decryptor for GnuPG encrypted files in JavaScript using openpgp.js . So I tried it naively without even asking if it is even possible. I made the following page. popup.html <!doctype html> <!-- --> <html> <head> <title>Popup</title> <script src="openpgp.js"></script> <script src="popup.js"></script> </head> <body> <p>Upload message: </p><input id="message" type="file"/><br> <p>Upload secret key: </p><input id="secret" type="file"/><br> <p>Secret key password: </p><input id="password" type="password"/><br><br> <button id="decrypt">Decrypt</button> <p id="output"></p