bifocal/node_modules/secure-keys
Jean Viscogliosi-Pate f8836547f1 Broken socials 2024-06-19 06:56:58 -07:00
..
test Broken socials 2024-06-19 06:56:58 -07:00
.npmignore Broken socials 2024-06-19 06:56:58 -07:00
.travis.yml Broken socials 2024-06-19 06:56:58 -07:00
README.md Broken socials 2024-06-19 06:56:58 -07:00
index.js Broken socials 2024-06-19 06:56:58 -07:00
package.json Broken socials 2024-06-19 06:56:58 -07:00

README.md

secure-keys

buildstatus

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