Skip to content

Instantly share code, notes, and snippets.

@hedgerh
Last active July 1, 2016 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedgerh/ad3673929fc15111110dc8f8d55b4106 to your computer and use it in GitHub Desktop.
Save hedgerh/ad3673929fc15111110dc8f8d55b4106 to your computer and use it in GitHub Desktop.
var openpgp = require('openpgp'); // use as CommonJS
var path = require('path');
//var __dirname = '/home/evan/Documents/jeff/node/jb';
var worker_path = path.join(__dirname, 'node_modules', 'openpgp','worker', 'worker.js');
openpgp.initWorker({ path: worker_path }); // set the relative web worker path
openpgp.config.aead_protect = true; // activate fast AES-GCM mode (not yet OpenPGP standard)
var fs = require('fs');
module.exports = function(cb) {
fs.readFile('/home/evan/postgres.gpg', cb)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment