1.0.3 • Published 2 years ago
aes-enc-dec v1.0.3
import { decrypt, encrypt } from "aes-enc-dec";
const sample = `This is a sample text`;
const superSecret = "zOZH6sdMpNWjRRIqCc7rdxs01lwHZfr9";
const hash = encrypt(Buffer.from(sample, "utf8"), superSecret);
console.log(hash);
const text = decrypt(hash, superSecret);
console.log(text);