summaryrefslogtreecommitdiff
path: root/doc/api/crypto.md
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2019-06-21 16:37:06 +0200
committerTobias Nießen <tniessen@tnie.de>2019-08-07 13:45:42 +0200
commit0c9ad34427cdc8a68c8b3e7c2d4748f462567680 (patch)
tree4daa9f7d90a2c5583c1d0052817c26f5a68bdb9a /doc/api/crypto.md
parent0b5b81c82af70072eac09d39ec43b5707d8d8a0c (diff)
downloadandroid-node-v8-0c9ad34427cdc8a68c8b3e7c2d4748f462567680.tar.gz
android-node-v8-0c9ad34427cdc8a68c8b3e7c2d4748f462567680.tar.bz2
android-node-v8-0c9ad34427cdc8a68c8b3e7c2d4748f462567680.zip
crypto: extend RSA-OAEP support with oaepHash
This adds an oaepHash option to asymmetric encryption which allows users to specify a hash function when using OAEP padding. This feature is required for interoperability with WebCrypto applications. PR-URL: https://github.com/nodejs/node/pull/28335 Fixes: https://github.com/nodejs/node/issues/25756 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Diffstat (limited to 'doc/api/crypto.md')
-rw-r--r--doc/api/crypto.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index 8132e29754..e0b736fe2f 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -2307,11 +2307,16 @@ An array of supported digest functions can be retrieved using
<!-- YAML
added: v0.11.14
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/28335
+ description: The `oaepHash` option was added.
- version: v11.6.0
pr-url: https://github.com/nodejs/node/pull/24234
description: This function now supports key objects.
-->
* `privateKey` {Object | string | Buffer | KeyObject}
+ - `oaepHash` {string} The hash function to use for OAEP padding.
+ **Default:** `'sha1'`
- `padding` {crypto.constants} An optional padding value defined in
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
`crypto.constants.RSA_PKCS1_PADDING`, or
@@ -2383,12 +2388,17 @@ be passed instead of a public key.
<!-- YAML
added: v0.11.14
changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/28335
+ description: The `oaepHash` option was added.
- version: v11.6.0
pr-url: https://github.com/nodejs/node/pull/24234
description: This function now supports key objects.
-->
* `key` {Object | string | Buffer | KeyObject}
- `key` {string | Buffer | KeyObject} A PEM encoded public or private key.
+ - `oaepHash` {string} The hash function to use for OAEP padding.
+ **Default:** `'sha1'`
- `passphrase` {string | Buffer} An optional passphrase for the private key.
- `padding` {crypto.constants} An optional padding value defined in
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,