Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/drulac/openpgpwrapper.js
- Owner: Drulac
- License: mit
- Created: 2017-07-21T14:52:32.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-24T16:08:45.000Z (over 7 years ago)
- Last Synced: 2024-11-07T09:29:19.539Z (10 days ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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);
})();
```