Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/drulac/openpgpwrapper.js

little wrapper around the npm's openpgp module
https://github.com/drulac/openpgpwrapper.js

Last synced: about 14 hours ago
JSON representation

little wrapper around the npm's openpgp module

Awesome Lists containing this project

README

        

# openpgpWrapper.js
little wrapper around the npm's openpgp module

```javascript
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);
})();
```