JSPass
JavaScript implementation of password store using OpenPGP.js. This library is inspired by standard UNIX password manager pass and compatible with it. It supports git versioning and encrypting password both in node.js and in browser. Library implements functionality similiar to gpg daemon, so it can store decrypted private keys for user specified time.
Getting started
Npm
npm install --save jspass
Alternatively, you can downlaod a minified build under dist.
Examples
In the next examples I will be using co library, but you can also use .then() method of Promise. Library uses Promises for all asynchronous operations.
Basic operations
var JSPass = ;var co = ; var publicKey = "-----BEGIN PGP PUBLIC KEY BLOCK ... END PGP PUBLIC KEY BLOCK-----";var privateKey = "-----BEGIN PGP PRIVATE KEY BLOCK ... END PGP PRIVATE KEY BLOCK-----"; //create new store with name example, which will hold decrypted private keys for 10 seconds and store keys in LocalStorage//Name of password store will be also prefix for saving in localStoragevar store = 10 true "example"; store;store; ;
Working with git
var JSPass = ;var co = ; var publicKey = "-----BEGIN PGP PUBLIC KEY BLOCK ... END PGP PUBLIC KEY BLOCK-----";var privateKey = "-----BEGIN PGP PRIVATE KEY BLOCK ... END PGP PRIVATE KEY BLOCK-----"; var store = 10 true "example"; store;store; ;