summaryrefslogtreecommitdiff
path: root/doc/api/crypto.md
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2018-09-10 22:36:14 +0200
committerTobias Nießen <tniessen@tnie.de>2018-09-20 14:31:18 +0200
commit085dcf0e59fe8c16370a553dbc8c4b792b5d3f68 (patch)
treefd293ccdae4e46876d1ba4564fa0af76111c8cd8 /doc/api/crypto.md
parent8c502f54cec557959861d0ec837ad30b020c1dca (diff)
downloadandroid-node-v8-085dcf0e59fe8c16370a553dbc8c4b792b5d3f68.tar.gz
android-node-v8-085dcf0e59fe8c16370a553dbc8c4b792b5d3f68.tar.bz2
android-node-v8-085dcf0e59fe8c16370a553dbc8c4b792b5d3f68.zip
crypto: allow promisifying generateKeyPair
PR-URL: https://github.com/nodejs/node/pull/22660 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'doc/api/crypto.md')
-rw-r--r--doc/api/crypto.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/api/crypto.md b/doc/api/crypto.md
index 0af7bea90e..b26e9cae04 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -1731,6 +1731,9 @@ buffer containing the data encoded as DER. Note that Node.js itself does not
accept DER, it is supported for interoperability with other libraries such as
WebCrypto only.
+If this method is invoked as its [`util.promisify()`][]ed version, it returns
+a `Promise` for an `Object` with `publicKey` and `privateKey` properties.
+
### crypto.generateKeyPairSync(type, options)
<!-- YAML
added: REPLACEME
@@ -2882,6 +2885,7 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
[`sign.update()`]: #crypto_sign_update_data_inputencoding
[`stream.transform` options]: stream.html#stream_new_stream_transform_options
[`stream.Writable` options]: stream.html#stream_constructor_new_stream_writable_options
+[`util.promisify()`]: util.html#util_util_promisify_original
[`verify.update()`]: #crypto_verify_update_data_inputencoding
[`verify.verify()`]: #crypto_verify_verify_object_signature_signatureformat
[AEAD algorithms]: https://en.wikipedia.org/wiki/Authenticated_encryption