crypto-object

1.0.0 • Public • Published

crypto-object

Encrypt Objects in Node.js, using built-in Crypto. Uses AES 256(CTR mode)

Build Status XO code style

Usage

$ npm i --save https://github.com/Euthor/crypto-object.git
const CryptoObject = require('crypto-object');
 
const cryptoObject = new CryptoObject({
  password: 'monica', // The encryption password - Required
  keys: ['foo', 'bar'] // Which object keys to encrypt - Required
});
 
cryptoObject.encrypt({foo: 'hello', bar: 'world', id: 'x-001'})
// `{ foo: '1a29e0e604', bar: '0523fee60f', id: 'x-001' }`
 
cryptoObject.decrypt({ foo: '1a29e0e604', bar: '0523fee60f', id: 'x-001' })
// `{ foo: 'hello', bar: 'world', id: 'x-001' }`

Run the tests

$ npm install -g mocha
$ npm test

Contributing?

# Always run the linter & fix code style before pushing 
$ npm run lint

Authors

Owners

License

The MIT License

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i crypto-object

    Weekly Downloads

    2

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • nicholaswmin