NPM package for object encryption and decryption
To get the this package. Run the following command:
npm install object-encrypt-decrypt --save
after installing package you need to add this to your node main file (e.g. index.js or server.js) by adding following command:
var objEncDec = require('object-encrypt-decrypt')
to encrypt object:
var object = { name: 'John Doe', email: '[email protected]', mobile: '**********', education: 'BTECH' } var encObject = objEncDec.encrypt(object);
To Decrypt the encrypted object:
var decObject = objEncDec.decrypt(encObject);