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: https://github.com/nodejs/node/issues/13633
PR-URL: https://github.com/nodejs/node/pull/16038
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Pavel Pomerantsev 2017-10-06 12:09:52 -07:00 committed by Anna Henningsen
parent 4552cf774d
commit 1b358f1fde
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -1714,8 +1714,8 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
added: v1.1.0
-->
- `publicKey` {Object | string}
- `key` {string} A PEM encoded private key.
- `passphrase` {string} An optional passphrase for the private key.
- `key` {string} A PEM encoded public key.
- `passphrase` {string} An optional passphrase for the public key.
- `padding` {crypto.constants} An optional padding value defined in
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING` or
`RSA_PKCS1_PADDING`.
@ -1734,8 +1734,8 @@ be passed instead of a public key.
added: v0.11.14
-->
- `publicKey` {Object | string}
- `key` {string} A PEM encoded private key.
- `passphrase` {string} An optional passphrase for the private key.
- `key` {string} A PEM encoded public key.
- `passphrase` {string} An optional passphrase for the public key.
- `padding` {crypto.constants} An optional padding value defined in
`crypto.constants`, which may be: `crypto.constants.RSA_NO_PADDING`,
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.