openpgp-wrapper
v1.2.1
Published
little wrapper around the npm's openpgp module
Downloads
4
Readme
openpgpWrapper.js
little wrapper around the npm's openpgp module
const OpenPGP = require('openpgp-wrapper');
(async()=>{
let pgp = new OpenPGP();
let keys = await pgp.generateKeys(512, { name:'Jon Smith', email:'[email protected]' }, "secret passphrase")
console.log(keys.privateKey);
console.log(keys.publicKey);
let encrypted = await pgp.encrypt("hello world", keys.publicKey, true);
console.log(encrypted)
let decrypted = await pgp.decryptAndVerifySignature(encrypted, keys.publicKey);
console.log(decrypted);
})();