Skip to content

Commit 62c8fb3

Browse files
DiegoRBaquerovsemozhetbyt
authored andcommitted
doc: make constants enumeration consistent
Add missing prefix `crypto.constants.` to `RSA_PKCS1_PADDING` in `crypto.privateEncrypt()`, `crypto.privateDecrypt()`, `crypto.publicEncrypt()`, and `crypto.publicDecrypt()`. PR-URL: #20991 Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
1 parent 9ae658e commit 62c8fb3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/api/crypto.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,8 @@ added: v0.11.14
19021902
- `passphrase` {string} An optional passphrase for the private key.
19031903
- `padding` {crypto.constants} An optional padding value defined in
19041904
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
1905-
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
1905+
`crypto.constants.RSA_PKCS1_PADDING`, or
1906+
`crypto.constants.RSA_PKCS1_OAEP_PADDING`.
19061907
- `buffer` {Buffer | TypedArray | DataView}
19071908
- Returns: {Buffer} A new `Buffer` with the decrypted content.
19081909

@@ -1920,7 +1921,7 @@ added: v1.1.0
19201921
- `passphrase` {string} An optional passphrase for the private key.
19211922
- `padding` {crypto.constants} An optional padding value defined in
19221923
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
1923-
`RSA_PKCS1_PADDING`.
1924+
`crypto.constants.RSA_PKCS1_PADDING`.
19241925
- `buffer` {Buffer | TypedArray | DataView}
19251926
- Returns: {Buffer} A new `Buffer` with the encrypted content.
19261927

@@ -1938,7 +1939,7 @@ added: v1.1.0
19381939
- `passphrase` {string} An optional passphrase for the private key.
19391940
- `padding` {crypto.constants} An optional padding value defined in
19401941
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
1941-
`RSA_PKCS1_PADDING`.
1942+
`crypto.constants.RSA_PKCS1_PADDING`.
19421943
- `buffer` {Buffer | TypedArray | DataView}
19431944
- Returns: {Buffer} A new `Buffer` with the decrypted content.
19441945

@@ -1959,7 +1960,8 @@ added: v0.11.14
19591960
- `passphrase` {string} An optional passphrase for the private key.
19601961
- `padding` {crypto.constants} An optional padding value defined in
19611962
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
1962-
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
1963+
`crypto.constants.RSA_PKCS1_PADDING`, or
1964+
`crypto.constants.RSA_PKCS1_OAEP_PADDING`.
19631965
- `buffer` {Buffer | TypedArray | DataView}
19641966
- Returns: {Buffer} A new `Buffer` with the encrypted content.
19651967

0 commit comments

Comments
 (0)