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
- Host: GitHub
- URL: https://github.com/philips/node-cryptostream
- Owner: philips
- License: other
- Created: 2012-03-19T14:08:14.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2012-05-29T00:17:33.000Z (about 14 years ago)
- Last Synced: 2025-07-02T06:46:11.289Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 104 KB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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