An open API service indexing awesome lists of open source software.

https://github.com/philips/node-cryptostream

node.js stream wrapper for crypto
https://github.com/philips/node-cryptostream

Last synced: 11 months ago
JSON representation

node.js stream wrapper for crypto

Awesome Lists containing this project

README

          

Stream object for crypto.

Example Usage:

var DecryptStream = require('./lib/cryptostream.js').DecryptStream;
var EncryptStream = require('./lib/cryptostream.js').EncryptStream;

var key = 'nodecryptostream';

var e = new EncryptStream(key);
var d = new DecryptStream(key);

fs.createReadStream(__filename).pipe(e).pipe(d).pipe(process.stdout, {end: false})

EncryptStream/DecryptStream (opts)

`opts` may be a the key (string) or a object. If `opts` is an object it _must_
have properties for `key` and `algorithm`, and _may_ have properties
`inputEncoding` and `outputEncoding`

also see [crypto.createCypher][createCypher]

[createCypher]: http://nodejs.org/api/crypto.html#crypto_crypto_createcipher_algorithm_password