Skip to content

Commit

Permalink
Clarified documentation for crypto.publicDecrypt() and similar functi…
Browse files Browse the repository at this point in the history
…ons as per nodejs#12946
  • Loading branch information
WilliamT1 committed May 25, 2017
1 parent bbf74fb commit 3585e6a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1612,6 +1612,7 @@ added: v0.11.14
- `buffer` {Buffer | TypedArray | DataView}

Decrypts `buffer` with `private_key`.
* Returns: New [`Buffer`][] with decrypted content

`private_key` can be an object or a string. If `private_key` is a string, it is
treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
Expand All @@ -1629,6 +1630,7 @@ added: v1.1.0
- `buffer` {Buffer | TypedArray | DataView}

Encrypts `buffer` with `private_key`.
* Returns: New [`Buffer`][] with encrypted content

`private_key` can be an object or a string. If `private_key` is a string, it is
treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
Expand All @@ -1646,6 +1648,7 @@ added: v1.1.0
- `buffer` {Buffer | TypedArray | DataView}

Decrypts `buffer` with `public_key`.
* Returns: New [`Buffer`][] with decrypted content

`public_key` can be an object or a string. If `public_key` is a string, it is
treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
Expand All @@ -1665,8 +1668,8 @@ added: v0.11.14
`RSA_PKCS1_PADDING`, or `crypto.constants.RSA_PKCS1_OAEP_PADDING`.
- `buffer` {Buffer | TypedArray | DataView}

Encrypts the content of `buffer` with `public_key` and returns a new
[`Buffer`][] with encrypted content.
Encrypts the content of `buffer` with `public_key`
* Returns: New [`Buffer`][] with encrypted content

`public_key` can be an object or a string. If `public_key` is a string, it is
treated as the key with no passphrase and will use `RSA_PKCS1_OAEP_PADDING`.
Expand Down

0 comments on commit 3585e6a

Please sign in to comment.