summaryrefslogtreecommitdiff
path: root/src/node_crypto.h
diff options
context:
space:
mode:
authorWei-Wei Wu <wuxx1045@umn.edu>2018-03-01 17:13:12 -0800
committerTobias Nießen <tniessen@tnie.de>2018-03-23 19:56:59 +0100
commitf2e02883e7ef6ff58331e980f91bc31d8076a5c8 (patch)
tree81055ee1ca2f44f3f127af876584a2c4c7910df2 /src/node_crypto.h
parenta0adf56855f59a301d9a1f69b4267ced4fd4cf03 (diff)
downloadandroid-node-v8-f2e02883e7ef6ff58331e980f91bc31d8076a5c8.tar.gz
android-node-v8-f2e02883e7ef6ff58331e980f91bc31d8076a5c8.tar.bz2
android-node-v8-f2e02883e7ef6ff58331e980f91bc31d8076a5c8.zip
crypto: add ECDH.convertKey to convert public keys
ECDH.convertKey is used to convert public keys between different formats. PR-URL: https://github.com/nodejs/node/pull/19080 Fixes: https://github.com/nodejs/node/issues/18977 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_crypto.h')
-rw-r--r--src/node_crypto.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/node_crypto.h b/src/node_crypto.h
index 668781aca9..1b2170ef85 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -627,6 +627,10 @@ class ECDH : public BaseObject {
}
static void Initialize(Environment* env, v8::Local<v8::Object> target);
+ static EC_POINT* BufferToPoint(Environment* env,
+ const EC_GROUP* group,
+ char* data,
+ size_t len);
protected:
ECDH(Environment* env, v8::Local<v8::Object> wrap, EC_KEY* key)
@@ -645,8 +649,6 @@ class ECDH : public BaseObject {
static void GetPublicKey(const v8::FunctionCallbackInfo<v8::Value>& args);
static void SetPublicKey(const v8::FunctionCallbackInfo<v8::Value>& args);
- EC_POINT* BufferToPoint(char* data, size_t len);
-
bool IsKeyPairValid();
bool IsKeyValidForCurve(const BIGNUM* private_key);