joyent/node — Issue #2494: HashUpdate(buffer) shouldn't call ToString
Author: marcello3d
Created: 2012-01-08 23:46:05+00:00
State: open

While profiling my code I noticed that some of my code is unexpectedly calling ToString on Buffers. From #node.js discussion with @bnoordhuis we noticed HashUpdate calling DecodeBytes which calls ToString
https://github.com/joyent/node/blob/472a72d/src/node_crypto.cc#L2917
https://github.com/joyent/node/blob/472a72d/src/node.cc#L1039

It seems like this step shouldn't be needed for HashUpdate to work with Buffers.