summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2018-09-20 19:53:44 +0200
committerTobias Nießen <tniessen@tnie.de>2018-12-24 14:50:16 +0100
commit823d86c47ce15fba8875fcebd412593b02aab362 (patch)
treea023dac2cbda38b6e194c7324e501e4054715af5 /tools
parent5570df407aae1e329955b1093e0e5b8bde270213 (diff)
downloadandroid-node-v8-823d86c47ce15fba8875fcebd412593b02aab362.tar.gz
android-node-v8-823d86c47ce15fba8875fcebd412593b02aab362.tar.bz2
android-node-v8-823d86c47ce15fba8875fcebd412593b02aab362.zip
crypto: add key object API
This commit makes multiple important changes: 1. A new key object API is introduced. The KeyObject class itself is not exposed to users, instead, several new APIs can be used to construct key objects: createSecretKey, createPrivateKey and createPublicKey. The new API also allows to convert between different key formats, and even though the API itself is not compatible to the WebCrypto standard in any way, it makes interoperability much simpler. 2. Key objects can be used instead of the raw key material in all relevant crypto APIs. 3. The handling of asymmetric keys has been unified and greatly improved. Node.js now fully supports both PEM-encoded and DER-encoded public and private keys. 4. Conversions between buffers and strings have been moved to native code for sensitive data such as symmetric keys due to security considerations such as zeroing temporary buffers. 5. For compatibility with older versions of the crypto API, this change allows to specify Buffers and strings as the "passphrase" option when reading or writing an encoded key. Note that this can result in unexpected behavior if the password contains a null byte. PR-URL: https://github.com/nodejs/node/pull/24234 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/doc/type-parser.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/doc/type-parser.js b/tools/doc/type-parser.js
index 527b44f969..e358885620 100644
--- a/tools/doc/type-parser.js
+++ b/tools/doc/type-parser.js
@@ -50,6 +50,7 @@ const customTypesMap = {
'ECDH': 'crypto.html#crypto_class_ecdh',
'Hash': 'crypto.html#crypto_class_hash',
'Hmac': 'crypto.html#crypto_class_hmac',
+ 'KeyObject': 'crypto.html#crypto_class_keyobject',
'Sign': 'crypto.html#crypto_class_sign',
'Verify': 'crypto.html#crypto_class_verify',
'crypto.constants': 'crypto.html#crypto_crypto_constants_1',