Skip to content

Commit

Permalink
docs: add note about default padding in crypto
Browse files Browse the repository at this point in the history
Adds a note that the default padding for publicDecrypt/privateEncrypt
is RSA_PKCS1_PADDING instead of RSA_PKCS1_OAEP_PADDING as it is for
privateDecrypt/publicEncrypt.

PR-URL: #659
Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com>
  • Loading branch information
calvinmetcalf authored and brendanashworth committed Jan 30, 2015
1 parent cf3e908 commit 7604e6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion doc/api/crypto.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -710,10 +710,12 @@ NOTE: All paddings are defined in `constants` module.
## crypto.privateEncrypt(private_key, buffer)

See above for details. Has the same API as `crypto.privateDecrypt`.
Default padding is `RSA_PKCS1_PADDING`.

## crypto.publicDecrypt(public_key, buffer)

See above for details. Has the same API as `crypto.publicEncrypt`.
See above for details. Has the same API as `crypto.publicEncrypt`. Default
padding is `RSA_PKCS1_PADDING`.

## crypto.DEFAULT_ENCODING

Expand Down

0 comments on commit 7604e6d

Please sign in to comment.