Simple util for AES-CBC encryption/decryption with node-forge.
npm install --save js-simple-aes
import Jsa from 'js-simple-aes';
const crypto = new Jsa({ key: 'my_secret_password' });
const data = [
{ name: 'first item', price: 73.52 },
{ name: 'second item', price: 0.15 }
];
const encrypted = crypto.encrypt(data);
// -->
// nf5kiNgcSSkf5yvVtw+/JEX4WmR5S8xuPFqfZwaoFk/7YK9pVJmWsfToiZK2SSNjEP0uswbjpSUiyib5JuB759wR8/mfefaaRpTpvmUFq0U=
const decrypted = crypto.decrypt(encrypted);
// -->
// [
// { name: 'first item', price: 73.52 },
// { name: 'second item', price: 0.15 }
// ];