0.0.1 • Published 11 years ago

node-cryptostream v0.0.1

Weekly downloads
8
License
-
Repository
github
Last release
11 years ago

node-cryptostream

Duplex stream implementation of Crypto.

Installation

$ npm install node-cryptostream

Usage

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);