A Node.js module to simplify using the built-in
crypto module for AES-256 encryption with random initialization vectors.
This module generates a random initialization vector each time one of the
encrypt methods is called.
Furthermore, your symmetric session key (a.k.a. secret, a.k.a. passphrase) can be of any size because it is hashed using SHA-256.
$ npm install aes256
Example using static methods
var aes256 = ;var key = 'my passphrase';var plaintext = 'my plaintext message';var encrypted = aes256;var decrypted = aes256;// plaintext === decrypted
Example using an
var aes256 = ;var key = 'my passphrase';var plaintext = 'my plaintext message';var cipher = aes256;var encrypted = cipher;var decrypted = cipher;// plaintext === decrypted
Documentation maaaaaybe forthcoming....
For now, looking at the above usage examples, the code, or the unit tests should all give you a pretty good idea without much effort as the API surface area is very small.
Copyright (c) 2015, James M. Greene (MIT License)