philips/node-cryptostream — pull request #1 by dominictarr (2012-05-28 03:15:04+00:00)
Title: inherit from Stream instead of EventEmitter, and support other crypto args

hi!

It's way better inherit from `Stream` that from `EventEmitter` because there is a lot of important stuff that pipe does there, like clean up the listeners after the stream ends. also, if you don't set `readable` and `writable` a real stream will not pipe to your custom stream.

also, I added support for other crypto args, so now you can pass in the algorithm, and set the input and output encodings by passing in a `{}` to `new [En/De]cryptStream(...)` instead of a string

it still defaults to 'aes-256-cbc', so this doesn't break the API.

for some reason though, aes-256-cbc didn't work for me. RC4 did. I don't understand what the problem is there.