summaryrefslogtreecommitdiff
path: root/src/node_crypto.h
diff options
context:
space:
mode:
authorPatrick Gansterer <paroga@paroga.com>2019-03-02 01:34:11 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-03-07 00:24:07 +0100
commit4895927a0a4372e0699f84657e0a299393a3d281 (patch)
treecf20299808c5833ea4c70c3c54e5eb302790bb29 /src/node_crypto.h
parent53d4e04be59bdc34ea0d8db994e7607b8af7d790 (diff)
downloadandroid-node-v8-4895927a0a4372e0699f84657e0a299393a3d281.tar.gz
android-node-v8-4895927a0a4372e0699f84657e0a299393a3d281.tar.bz2
android-node-v8-4895927a0a4372e0699f84657e0a299393a3d281.zip
crypto: add KeyObject.asymmetricKeySize
Expose the size of asymetric keys of crypto key object from the crypto module added in v11.6.0. PR-URL: https://github.com/nodejs/node/pull/26387 Refs: https://github.com/nodejs/node/pull/24234 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'src/node_crypto.h')
-rw-r--r--src/node_crypto.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/node_crypto.h b/src/node_crypto.h
index 982fc70543..c4477a12f6 100644
--- a/src/node_crypto.h
+++ b/src/node_crypto.h
@@ -456,6 +456,7 @@ class KeyObject : public BaseObject {
// only be used to implement cryptograohic operations requiring the key.
ManagedEVPPKey GetAsymmetricKey() const;
const char* GetSymmetricKey() const;
+ size_t GetAsymmetricKeySize() const;
size_t GetSymmetricKeySize() const;
protected:
@@ -470,6 +471,9 @@ class KeyObject : public BaseObject {
const v8::FunctionCallbackInfo<v8::Value>& args);
v8::Local<v8::String> GetAsymmetricKeyType() const;
+ static void GetAsymmetricKeySize(
+ const v8::FunctionCallbackInfo<v8::Value>& args);
+
static void GetSymmetricKeySize(
const v8::FunctionCallbackInfo<v8::Value>& args);