This package has been deprecated

Author message:

unsupported / joke / demo

p-kvstore-crypt

1.0.0 • Public • Published

p-kvstore-crypto

Wrap any p-kvstore to encrypt data stored transparently using an aesXXX cipher.

The values are encrypted while the keys are rehashed using sha256 with the key and iv.

const MapStore = require('p-kvstore').MapStore;
const CryptStore = require('p-kvstore-crypt');
 
const store = new CryptStore({
  password: 'my-ultra-secret-password',
  salt: 'some-spice-for-the-password', // optional: will use the sha256 of the password by default
  iterations: 1024, // optional: iterations used in pbkdf2
  algorithm: 'aes256', // optional: aes256|aes192|aes128
  backing: new MapStore()
});
const MapStore = require('p-kvstore').MapStore;
const CryptStore = require('p-kvstore-crypt');
 
const store = new CryptStore({
  key: new Buffer('key of correct length'),
  iv: new Buffer('iv of correct length'),
  algorithm: 'aes256', // optional: aes256|aes192|aes128
  backing: new MapStore()
});

Dependencies (2)

Dev Dependencies (1)

Package Sidebar

Install

npm i p-kvstore-crypt

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • pipobscure