Skip to content

Commit a3a1068

Browse files
jieyanhuanglance
authored andcommittedOct 16, 2017
doc: add return values in crypto documentation
Clarify return values for crypto.publicEncrypt and similar functions PR-URL: #16229 Fixes: #12946 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent 3b7a9a2 commit a3a1068

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎doc/api/crypto.md

+4
Original file line numberDiff line numberDiff line change
@@ -1687,6 +1687,7 @@ added: v0.11.14
16871687
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
16881688
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
16891689
- `buffer` {Buffer | TypedArray | DataView}
1690+
- Returns: {Buffer} A new `Buffer` with the decrypted content.
16901691

16911692
Decrypts `buffer` with `privateKey`.
16921693

@@ -1704,6 +1705,7 @@ added: v1.1.0
17041705
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
17051706
`RSA_PKCS1_PADDING`.
17061707
- `buffer` {Buffer | TypedArray | DataView}
1708+
- Returns: {Buffer} A new `Buffer` with the encrypted content.
17071709

17081710
Encrypts `buffer` with `privateKey`.
17091711

@@ -1721,6 +1723,7 @@ added: v1.1.0
17211723
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
17221724
`RSA_PKCS1_PADDING`.
17231725
- `buffer` {Buffer | TypedArray | DataView}
1726+
- Returns: {Buffer} A new `Buffer` with the decrypted content.
17241727

17251728
Decrypts `buffer` with `publicKey`.
17261729

@@ -1741,6 +1744,7 @@ added: v0.11.14
17411744
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
17421745
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
17431746
- `buffer` {Buffer | TypedArray | DataView}
1747+
- Returns: {Buffer} A new `Buffer` with the encrypted content.
17441748

17451749
Encrypts the content of `buffer` with `publicKey` and returns a new
17461750
[`Buffer`][] with encrypted content.

0 commit comments

Comments
 (0)
Please sign in to comment.