encryption-aes
v1.0.1
Published
Simple AES Encryption without using third party
Maintainers
Readme
encryption-aes
A library to perform AES encryption and decryption in Node JS Applications using the crypto module and aes-256-gcm algorithm.
Installation
npm install encryption-aesUsage
import {encrypt,decrypt,Key} from 'encryption-aes';
const key = Buffer.from(Key, 'base64'); // Use the predefined key from env variable. Generate for one during application setup.
const plaintext = "Hello, World!";
const ciphertext = encrypt(plaintext, key);
console.log("Ciphertext:", ciphertext);
const decryptedText = decrypt(ciphertext, key);
console.log("Decrypted Text:", decryptedText);
