Cipher: AES/256/CBC/PKCS7Padding with random generated salt
Works well both on the browsers and on the node.js Compatible with React-native
Add to your html page
<script src="path/to/aes-everywhere/javascript/dist/aes256.min.js"></script>
Usage:
// encryption
var encrypted = AES256.encrypt('TEXT', 'PASSWORD');
console.log(encrypted);
// decryption
console.log(AES256.decrypt(encrypted, 'PASSWORD'));
Installation:
npm install aes-everywhere
Usage:
var AES256 = require('aes-everywhere');
// or
// import AES256 from 'aes-everywhere';
// encryption
var encrypted = AES256.encrypt('TEXT', 'PASSWORD')
console.log(encrypted);
// decryption
console.log(AES256.decrypt(encrypted, 'PASSWORD'));
import AES256 from 'aes-everywhere';
// encryption
const encrypted = AES256.encrypt('TEXT', 'PASSWORD');
console.log(encrypted);
// decryption
console.log(AES256.decrypt(encrypted, 'PASSWORD'));