Skip to content

Commit 6d975ea

Browse files
pomerantsevMylesBorins
authored andcommitted
doc: fix: correctly use public key instead of private key
Although, as docs mention, private keys can be used instead of public keys, I presume that these parameter explanations should be corrected. Fixes: #13633 PR-URL: #16038 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 96030bb commit 6d975ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/crypto.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1661,8 +1661,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
16611661
added: v1.1.0
16621662
-->
16631663
- `publicKey` {Object | string}
1664-
- `key` {string} A PEM encoded private key.
1665-
- `passphrase` {string} An optional passphrase for the private key.
1664+
- `key` {string} A PEM encoded public key.
1665+
- `passphrase` {string} An optional passphrase for the public key.
16661666
- `padding` {crypto.constants} An optional padding value defined in
16671667
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
16681668
`RSA_PKCS1_PADDING`.
@@ -1681,8 +1681,8 @@ be passed instead of a public key.
16811681
added: v0.11.14
16821682
-->
16831683
- `publicKey` {Object | string}
1684-
- `key` {string} A PEM encoded private key.
1685-
- `passphrase` {string} An optional passphrase for the private key.
1684+
- `key` {string} A PEM encoded public key.
1685+
- `passphrase` {string} An optional passphrase for the public key.
16861686
- `padding` {crypto.constants} An optional padding value defined in
16871687
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
16881688
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.

0 commit comments

Comments
 (0)