cryptobject provides AES256 encryption to every string value in an object.
npm install --save cryptobject
To use cryptobject, simply import the package and call one of encrypt
or decrypt
to create encrypt or decrypt an object.
const { encrypt, decrypt } = require('cryptobject')('passphrase');
const obj = { 'key': 'value' };
const encryptedObject = encrypt(obj);
const decrytpedObject = decrypt(encryptedObject);
MIT