This is an easy to use AES256 module for nodejs.
npm install nodejs-aes256This module generates a random initialization vector each time the encrypt method is called. Furthermore, your shared key can be of any size because it is hashed using sha256.
npm install nodejs-aes256
var aes256 = require('nodejs-aes256');
var ciphertext = aes256.encrypt(key, plaintext);
var plaintext = aes256.decrypt(key, ciphertext);
* This has only been tested with strings for the shared key and plaintext
* It does not detect if decryption has failed