npm install --save aes-enc-js
Also available to install globally:
npm install --global aes-enc-js
To include aes-enc-js on your website or npm application, use any of the following methods.
const { encrypt, decrypt } = require("aes-enc-js");
import { encrypt, decrypt } = "aes-enc-js";
const T = "This text is going to encrypt.";
const E = encrypt(T);
const D = decrypt(E);
console.log("ORIGINAL TEXT IS "+ T);
console.log("ENCRPYTED TEXT IS " + E);
console.log("DECRPYTED TEXT IS " + D);
Change secret key from index.js file.
const K = "4951882490015028";
Apache-2.0. Copyright (c) Arsalan Akhtar, Inc.