object_cryptor

0.0.2 • Public • Published

Object encryptor decryptor using aes192. It converts any object to a base64 encrypted string, and the oposite from an encrypted base64 string to an object. Note that objects are first converted to JSON, don't expect functions to be converted.

Example:

c=require('object_cryptor');
c1=c(''abcdefghijklmnopqrstuvxyz');
var obj = {
  a: 'a',
  'one': 1,
  'sub': {
    'two': 2,
    'three': 'three'
  }
}
c1.encrypt(obj);
// 'VZE/AoEbgIzaOAKeBTp5523SfXKEGchfw1dLHTzs2dJRz9u4DxfICGfpxqaRwgc/WsBZj4igPHdxF1BTlsS+Vg=='

c1.decrypt('VZE/AoEbgIzaOAKeBTp5523SfXKEGchfw1dLHTzs2dJRz9u4DxfICGfpxqaRwgc/WsBZj4igPHdxF1BTlsS+Vg==')
// { a: 'a', one: 1, sub: { two: 2, three: 'three' } }

Readme

Keywords

none

Package Sidebar

Install

npm i object_cryptor

Weekly Downloads

0

Version

0.0.2

License

ISC

Last publish

Collaborators

  • davidgaya