Duplex stream implementation of Crypto.
$ npm install node-cryptostream
var cryptostream = require('node-cryptostream'),
EncryptStream = new cryptostream.EncryptStream({ algorithm: 'aes-256-cbc', key: 'key123' }),
DecryptStream = new cryptostream.DecryptStream({ algorithm: 'aes-256-cbc', key: 'key123' });
var textStream = fs.createReadStream('file.txt');
textStream.pipe(EncryptStream).pipe(DecryptStream);