js-simple-aes

0.0.1 • Public • Published

Js-simple-aes

Simple util for AES-CBC encryption/decryption with node-forge.

Installation

npm install --save js-simple-aes

Usage

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 }
// ];

Readme

Keywords

none

Package Sidebar

Install

npm i js-simple-aes

Weekly Downloads

1

Version

0.0.1

License

WTFPL

Unpacked Size

3.18 kB

Total Files

6

Last publish

Collaborators

  • lukasz.guzek