joyent/node — pull request #4179 by isaacs (2012-10-22 18:04:28+00:00)
Title: Crypto buffers

Of course, the commits should be squashed, but I figured it might be good to see them split out, for easier reviewing in a more atomic way.

This makes the node crypto module default to using Buffers. There is a flag that can be set to make it use 'binary' encoded strings by default, for ease of upgrading. All of the buffer/string handling code is moved into JS, so it can use the same Buffer implementation as everything else.

It would be nice if the crypto functions used Buffers instead of SlowBuffers, but that's a much more involved change.