From 1b358f1fde0efc83058e85c7767c4f78a8e6d723 Mon Sep 17 00:00:00 2001 From: Pavel Pomerantsev Date: Fri, 6 Oct 2017 12:09:52 -0700 Subject: [PATCH] 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 Reviewed-By: Ruben Bridgewater --- doc/api/crypto.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 7ec813ba0f1..8bafbfe791b 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -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`.