summaryrefslogtreecommitdiff
path: root/src/node_crypto.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2017-07-10 12:56:37 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2017-07-17 23:09:32 +0200
commita3b9f4b452a7dbc122713b7a5a2f550f686f1d8e (patch)
tree408048d8ca17765ee72f62de9d0f0a942af5725e /src/node_crypto.h
parent4803d0ae09216f2355820b9a2436fa3242054606 (diff)
downloadandroid-node-v8-a3b9f4b452a7dbc122713b7a5a2f550f686f1d8e.tar.gz
android-node-v8-a3b9f4b452a7dbc122713b7a5a2f550f686f1d8e.tar.bz2
android-node-v8-a3b9f4b452a7dbc122713b7a5a2f550f686f1d8e.zip
src: avoid heap allocation in hmac.digest()
Add a test that ensures the second call to .digest() returns an empty HMAC, like it did before. No comment on whether that is the right behavior or not. PR-URL: https://github.com/nodejs/node/pull/14122 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_crypto.h')
-rw-r--r--src/node_crypto.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/node_crypto.h b/src/node_crypto.h
index a2b8cb7a88..eb5ca2b770 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -494,7 +494,6 @@ class Hmac : public BaseObject {
protected:
void HmacInit(const char* hash_type, const char* key, int key_len);
bool HmacUpdate(const char* data, int len);
- bool HmacDigest(unsigned char** md_value, unsigned int* md_len);
static void New(const v8::FunctionCallbackInfo<v8::Value>& args);
static void HmacInit(const v8::FunctionCallbackInfo<v8::Value>& args);