Socket
Socket
Sign inDemoInstall

secure-keys

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    secure-keys

Encrypt/Decrypt the values of a given object


Version published
Weekly downloads
404K
decreased by-3.24%
Maintainers
1
Install size
6.72 kB
Created
Weekly downloads
 

Readme

Source

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

Keywords

FAQs

Last updated on 02 Feb 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc