File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1637,7 +1637,7 @@ treated as the key with no passphrase and will use `RSA_PKCS1_PADDING`.
1637
1637
<!-- YAML
1638
1638
added: v1.1.0
1639
1639
-->
1640
- - ` private_key ` {Object | string}
1640
+ - ` public_key ` {Object | string}
1641
1641
- ` key ` {string} A PEM encoded private key.
1642
1642
- ` passphrase ` {string} An optional passphrase for the private key.
1643
1643
- ` padding ` {crypto.constants} An optional padding value defined in
@@ -1657,15 +1657,16 @@ be passed instead of a public key.
1657
1657
<!-- YAML
1658
1658
added: v0.11.14
1659
1659
-->
1660
- - ` private_key ` {Object | string}
1660
+ - ` public_key ` {Object | string}
1661
1661
- ` key ` {string} A PEM encoded private key.
1662
1662
- ` passphrase ` {string} An optional passphrase for the private key.
1663
1663
- ` padding ` {crypto.constants} An optional padding value defined in
1664
1664
` crypto.constants ` , which may be: ` crypto.constants.RSA_NO_PADDING ` ,
1665
1665
` RSA_PKCS1_PADDING ` , or ` crypto.constants.RSA_PKCS1_OAEP_PADDING ` .
1666
1666
- ` buffer ` {Buffer | TypedArray | DataView}
1667
1667
1668
- Encrypts ` buffer ` with ` public_key ` .
1668
+ Encrypts the content of ` buffer ` with ` public_key ` and returns a new
1669
+ [ ` Buffer ` ] [ ] with encrypted content.
1669
1670
1670
1671
` public_key ` can be an object or a string. If ` public_key ` is a string, it is
1671
1672
treated as the key with no passphrase and will use ` RSA_PKCS1_OAEP_PADDING ` .
You can’t perform that action at this time.
0 commit comments