summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Huang <jieyanhuang@gmail.com>2017-10-16 16:16:58 +0800
committerLance Ball <lball@redhat.com>2017-10-16 16:31:18 -0400
commita3a106865a95665a3f2d8d7c03a1a12f1680a087 (patch)
tree6527eaaa017463b0327a745e5cb911690628392c
parent3b7a9a2589a55f3c4cb9abc2162351b22aec6973 (diff)
downloadandroid-node-v8-a3a106865a95665a3f2d8d7c03a1a12f1680a087.tar.gz
android-node-v8-a3a106865a95665a3f2d8d7c03a1a12f1680a087.tar.bz2
android-node-v8-a3a106865a95665a3f2d8d7c03a1a12f1680a087.zip
doc: add return values in crypto documentation
Clarify return values for crypto.publicEncrypt and similar functions PR-URL: https://github.com/nodejs/node/pull/16229 Fixes: https://github.com/nodejs/node/issues/12946 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
-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 6b78ba38e6..45000c8c89 100644
--- a/doc/api/crypto.md
+++ b/doc/api/crypto.md
@@ -1687,6 +1687,7 @@ added: v0.11.14
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
- `buffer` {Buffer | TypedArray | DataView}
+- Returns: {Buffer} A new `Buffer` with the decrypted content.
Decrypts `buffer` with `privateKey`.
@@ -1704,6 +1705,7 @@ added: v1.1.0
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
`RSA_PKCS1_PADDING`.
- `buffer` {Buffer | TypedArray | DataView}
+- Returns: {Buffer} A new `Buffer` with the encrypted content.
Encrypts `buffer` with `privateKey`.
@@ -1721,6 +1723,7 @@ added: v1.1.0
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
`RSA_PKCS1_PADDING`.
- `buffer` {Buffer | TypedArray | DataView}
+- Returns: {Buffer} A new `Buffer` with the decrypted content.
Decrypts `buffer` with `publicKey`.
@@ -1741,6 +1744,7 @@ added: v0.11.14
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
- `buffer` {Buffer | TypedArray | DataView}
+- Returns: {Buffer} A new `Buffer` with the encrypted content.
Encrypts the content of `buffer` with `publicKey` and returns a new
[`Buffer`][] with encrypted content.