Skip to content

Commit

Permalink
doc: Update doc of publicEncrypt method
Browse files Browse the repository at this point in the history
As per nodejs#12946
the crypto doc for publicEncrypt doesn't tell
you whether the encryption happens in place or not.
  • Loading branch information
fhalde committed May 10, 2017
1 parent 57a08e2 commit 06e7657
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions doc/api/crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
<!-- YAML
added: v1.1.0
-->
- `private_key` {Object | string}
- `public_key` {Object | string}
- `key` {string} A PEM encoded private key.
- `passphrase` {string} An optional passphrase for the private key.
- `padding` {crypto.constants} An optional padding value defined in
Expand All @@ -1657,15 +1657,16 @@ be passed instead of a public key.
<!-- YAML
added: v0.11.14
-->
- `private_key` {Object | string}
- `public_key` {Object | string}
- `key` {string} A PEM encoded private key.
- `passphrase` {string} An optional passphrase for the private 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`.
- `buffer` {Buffer | TypedArray | DataView}

Encrypts `buffer` with `public_key`.
Encrypts the content of `buffer` with `public_key` and returns a 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 06e7657

Please sign in to comment.