@@ -1912,7 +1912,8 @@ added: v0.11.14
1912
1912
* ` buffer ` {Buffer | TypedArray | DataView}
1913
1913
* Returns: {Buffer} A new ` Buffer ` with the decrypted content.
1914
1914
1915
- Decrypts ` buffer ` with ` privateKey ` .
1915
+ Decrypts ` buffer ` with ` privateKey ` . ` buffer ` was previously encrypted using
1916
+ the corresponding public key, for example using [ ` crypto.publicEncrypt() ` ] [ ] .
1916
1917
1917
1918
` privateKey ` can be an object or a string. If ` privateKey ` is a string, it is
1918
1919
treated as the key with no passphrase and will use ` RSA_PKCS1_OAEP_PADDING ` .
@@ -1930,7 +1931,8 @@ added: v1.1.0
1930
1931
* ` buffer ` {Buffer | TypedArray | DataView}
1931
1932
* Returns: {Buffer} A new ` Buffer ` with the encrypted content.
1932
1933
1933
- Encrypts ` buffer ` with ` privateKey ` .
1934
+ Encrypts ` buffer ` with ` privateKey ` . The returned data can be decrypted using
1935
+ the corresponding public key, for example using [ ` crypto.publicDecrypt() ` ] [ ] .
1934
1936
1935
1937
` privateKey ` can be an object or a string. If ` privateKey ` is a string, it is
1936
1938
treated as the key with no passphrase and will use ` RSA_PKCS1_PADDING ` .
@@ -1948,7 +1950,8 @@ added: v1.1.0
1948
1950
* ` buffer ` {Buffer | TypedArray | DataView}
1949
1951
* Returns: {Buffer} A new ` Buffer ` with the decrypted content.
1950
1952
1951
- Decrypts ` buffer ` with ` key ` .
1953
+ Decrypts ` buffer ` with ` key ` .` buffer ` was previously encrypted using
1954
+ the corresponding private key, for example using [ ` crypto.privateEncrypt() ` ] [ ] .
1952
1955
1953
1956
` key ` can be an object or a string. If ` key ` is a string, it is treated as
1954
1957
the key with no passphrase and will use ` RSA_PKCS1_PADDING ` .
@@ -1971,7 +1974,8 @@ added: v0.11.14
1971
1974
* Returns: {Buffer} A new ` Buffer ` with the encrypted content.
1972
1975
1973
1976
Encrypts the content of ` buffer ` with ` key ` and returns a new
1974
- [ ` Buffer ` ] [ ] with encrypted content.
1977
+ [ ` Buffer ` ] [ ] with encrypted content. The returned data can be decrypted using
1978
+ the corresponding private key, for example using [ ` crypto.privateDecrypt() ` ] [ ] .
1975
1979
1976
1980
` key ` can be an object or a string. If ` key ` is a string, it is treated as
1977
1981
the key with no passphrase and will use ` RSA_PKCS1_OAEP_PADDING ` .
@@ -2765,6 +2769,10 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
2765
2769
[ `crypto.createVerify()` ] : #crypto_crypto_createverify_algorithm_options
2766
2770
[ `crypto.getCurves()` ] : #crypto_crypto_getcurves
2767
2771
[ `crypto.getHashes()` ] : #crypto_crypto_gethashes
2772
+ [ `crypto.privateDecrypt()` ] : #crypto_crypto_privatedecrypt_privatekey_buffer
2773
+ [ `crypto.privateEncrypt()` ] : #crypto_crypto_privateencrypt_privatekey_buffer
2774
+ [ `crypto.publicDecrypt()` ] : #crypto_crypto_publicdecrypt_key_buffer
2775
+ [ `crypto.publicEncrypt()` ] : #crypto_crypto_publicencrypt_key_buffer
2768
2776
[ `crypto.randomBytes()` ] : #crypto_crypto_randombytes_size_callback
2769
2777
[ `crypto.randomFill()` ] : #crypto_crypto_randomfill_buffer_offset_size_callback
2770
2778
[ `crypto.scrypt()` ] : #crypto_crypto_scrypt_password_salt_keylen_options_callback
0 commit comments