rittenhop-ghost/versions/5.94.2/node_modules/secure-keys
2024-09-23 19:05:38 -04:00
..
test adding local files for running this....locally 2024-09-23 19:05:38 -04:00
.npmignore adding local files for running this....locally 2024-09-23 19:05:38 -04:00
.travis.yml adding local files for running this....locally 2024-09-23 19:05:38 -04:00
index.js adding local files for running this....locally 2024-09-23 19:05:38 -04:00
package.json adding local files for running this....locally 2024-09-23 19:05:38 -04:00
README.md adding local files for running this....locally 2024-09-23 19:05:38 -04:00

secure-keys

build
status

A simple module that encrypts/decrypts the keys of a given object

install

npm i secure-keys --save

usage


var SecK = require('secure-keys');

var sec = new SecK({
  secret: 'BEGIN RSA', // Text of key used for encrypting/decrypting
  format: JSON, // optional (defaults to JSON): An object with `stringify` and `parse` methods
  alg: 'aes-256-ctr' //optional (this is default) Algorithm to use for encrypt/decrypt
});

var encryptedObj = sec.encrypt({
  myConfig: 'values',
  needTo: 'be safe'
});

var decryptedObj = sec.decrypt(encryptedObj);

LICENSE

MIT


This code was yanked out of work by @indexzero for nconf