Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
README.md
package.json

README.md

build status

node-aes-helper

AES encryption & decryption drop-in helper

Installation:


npm install aes-helper

Usage:

var aes = require('aes-helper');

var password  = 'pEm@@5M6~8rJ.c%3z*4=-{9};t7PP`j<0/KAC89t9V3Y57 >;(IrIb$K,w6`JV*|';
var plaintext = "Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Cras mattis consectetur purus sit amet fermentum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vestibulum id ligula porta felis euismod semper. Sed posuere consectetur est at lobortis.";

var ciphertext = aes.encrypt(plaintext, password);
var decoded = aes.decrypt(ciphertext, password);

console.log("Encrypted:\n" + ciphertext + "\n");
console.log("Decrypted:\n" + decoded + "\n");

console.log("Test:");
console.log((decoded === plaintext ? 'Text matches, all okay.' : 'Problems...'));
Something went wrong with that request. Please try again.