Skip to content

Commit 7604e6d

Browse files
calvinmetcalfbrendanashworth
authored andcommitted
docs: add note about default padding in crypto
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 <[email protected]>
1 parent cf3e908 commit 7604e6d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/api/crypto.markdown

+3-1
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,12 @@ NOTE: All paddings are defined in `constants` module.
710710
## crypto.privateEncrypt(private_key, buffer)
711711

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

714715
## crypto.publicDecrypt(public_key, buffer)
715716

716-
See above for details. Has the same API as `crypto.publicEncrypt`.
717+
See above for details. Has the same API as `crypto.publicEncrypt`. Default
718+
padding is `RSA_PKCS1_PADDING`.
717719

718720
## crypto.DEFAULT_ENCODING
719721

0 commit comments

Comments
 (0)