@@ -1172,15 +1172,16 @@ added: v6.0.0
11721172Property for checking and controlling whether a FIPS compliant crypto provider is
11731173currently in use. Setting to true requires a FIPS build of Node.js.
11741174
1175- ### crypto.createCipher(algorithm, password)
1175+ ### crypto.createCipher(algorithm, password[ , options ] )
11761176<!-- YAML
11771177added: v0.1.94
11781178-->
11791179- ` algorithm ` {string}
11801180- ` password ` {string | Buffer | TypedArray | DataView}
1181+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
11811182
11821183Creates and returns a ` Cipher ` object that uses the given ` algorithm ` and
1183- ` password ` .
1184+ ` password ` . Optional ` options ` argument controls stream behavior.
11841185
11851186The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
11861187recent OpenSSL releases, ` openssl list-cipher-algorithms ` will display the
@@ -1206,13 +1207,14 @@ they are used in order to avoid the risk of IV reuse that causes
12061207vulnerabilities. For the case when IV is reused in GCM, see [ Nonce-Disrespecting
12071208Adversaries] [ ] for details.
12081209
1209- ### crypto.createCipheriv(algorithm, key, iv)
1210+ ### crypto.createCipheriv(algorithm, key, iv[ , options ] )
12101211- ` algorithm ` {string}
12111212- ` key ` {string | Buffer | TypedArray | DataView}
12121213- ` iv ` {string | Buffer | TypedArray | DataView}
1214+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
12131215
12141216Creates and returns a ` Cipher ` object, with the given ` algorithm ` , ` key ` and
1215- initialization vector (` iv ` ).
1217+ initialization vector (` iv ` ). Optional ` options ` argument controls stream behavior.
12161218
12171219The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
12181220recent OpenSSL releases, ` openssl list-cipher-algorithms ` will display the
@@ -1240,15 +1242,16 @@ value.
12401242Returns a ` tls.SecureContext ` , as-if [ ` tls.createSecureContext() ` ] [ ] had been
12411243called.
12421244
1243- ### crypto.createDecipher(algorithm, password)
1245+ ### crypto.createDecipher(algorithm, password[ , options ] )
12441246<!-- YAML
12451247added: v0.1.94
12461248-->
12471249- ` algorithm ` {string}
12481250- ` password ` {string | Buffer | TypedArray | DataView}
1251+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
12491252
12501253Creates and returns a ` Decipher ` object that uses the given ` algorithm ` and
1251- ` password ` (key).
1254+ ` password ` (key). Optional ` options ` argument controls stream behavior.
12521255
12531256The implementation of ` crypto.createDecipher() ` derives keys using the OpenSSL
12541257function [ ` EVP_BytesToKey ` ] [ ] with the digest algorithm set to MD5, one
@@ -1262,16 +1265,18 @@ In line with OpenSSL's recommendation to use pbkdf2 instead of
12621265their own using [ ` crypto.pbkdf2() ` ] [ ] and to use [ ` crypto.createDecipheriv() ` ] [ ]
12631266to create the ` Decipher ` object.
12641267
1265- ### crypto.createDecipheriv(algorithm, key, iv)
1268+ ### crypto.createDecipheriv(algorithm, key, iv[ , options ] )
12661269<!-- YAML
12671270added: v0.1.94
12681271-->
12691272- ` algorithm ` {string}
12701273- ` key ` {string | Buffer | TypedArray | DataView}
12711274- ` iv ` {string | Buffer | TypedArray | DataView}
1275+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
12721276
12731277Creates and returns a ` Decipher ` object that uses the given ` algorithm ` , ` key `
1274- and initialization vector (` iv ` ).
1278+ and initialization vector (` iv ` ). Optional ` options ` argument controls stream
1279+ behavior.
12751280
12761281The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
12771282recent OpenSSL releases, ` openssl list-cipher-algorithms ` will display the
@@ -1339,14 +1344,16 @@ predefined curve specified by the `curveName` string. Use
13391344OpenSSL releases, ` openssl ecparam -list_curves ` will also display the name
13401345and description of each available elliptic curve.
13411346
1342- ### crypto.createHash(algorithm)
1347+ ### crypto.createHash(algorithm[ , options ] )
13431348<!-- YAML
13441349added: v0.1.92
13451350-->
13461351- ` algorithm ` {string}
1352+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
13471353
13481354Creates and returns a ` Hash ` object that can be used to generate hash digests
1349- using the given ` algorithm ` .
1355+ using the given ` algorithm ` . Optional ` options ` argument controls stream
1356+ behavior.
13501357
13511358The ` algorithm ` is dependent on the available algorithms supported by the
13521359version of OpenSSL on the platform. Examples are ` 'sha256' ` , ` 'sha512' ` , etc.
@@ -1373,14 +1380,16 @@ input.on('readable', () => {
13731380});
13741381```
13751382
1376- ### crypto.createHmac(algorithm, key)
1383+ ### crypto.createHmac(algorithm, key[ , options ] )
13771384<!-- YAML
13781385added: v0.1.94
13791386-->
13801387- ` algorithm ` {string}
13811388- ` key ` {string | Buffer | TypedArray | DataView}
1389+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
13821390
13831391Creates and returns an ` Hmac ` object that uses the given ` algorithm ` and ` key ` .
1392+ Optional ` options ` argument controls stream behavior.
13841393
13851394The ` algorithm ` is dependent on the available algorithms supported by the
13861395version of OpenSSL on the platform. Examples are ` 'sha256' ` , ` 'sha512' ` , etc.
@@ -1409,25 +1418,29 @@ input.on('readable', () => {
14091418});
14101419```
14111420
1412- ### crypto.createSign(algorithm)
1421+ ### crypto.createSign(algorithm[ , options ] )
14131422<!-- YAML
14141423added: v0.1.92
14151424-->
14161425- ` algorithm ` {string}
1426+ - ` options ` {Object} [ ` stream.Writable ` options] [ ]
14171427
14181428Creates and returns a ` Sign ` object that uses the given ` algorithm ` .
14191429Use [ ` crypto.getHashes() ` ] [ ] to obtain an array of names of the available
1420- signing algorithms.
1430+ signing algorithms. Optional ` options ` argument controls the
1431+ ` stream.Writable ` behavior.
14211432
1422- ### crypto.createVerify(algorithm)
1433+ ### crypto.createVerify(algorithm[ , options ] )
14231434<!-- YAML
14241435added: v0.1.92
14251436-->
14261437- ` algorithm ` {string}
1438+ - ` options ` {Object} [ ` stream.Writable ` options] [ ]
14271439
14281440Creates and returns a ` Verify ` object that uses the given algorithm.
14291441Use [ ` crypto.getHashes() ` ] [ ] to obtain an array of names of the available
1430- signing algorithms.
1442+ signing algorithms. Optional ` options ` argument controls the
1443+ ` stream.Writable ` behavior.
14311444
14321445### crypto.getCiphers()
14331446<!-- YAML
@@ -2225,16 +2238,16 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
22252238[ `UV_THREADPOOL_SIZE` ] : cli.html#cli_uv_threadpool_size_size
22262239[ `cipher.final()` ] : #crypto_cipher_final_outputencoding
22272240[ `cipher.update()` ] : #crypto_cipher_update_data_inputencoding_outputencoding
2228- [ `crypto.createCipher()` ] : #crypto_crypto_createcipher_algorithm_password
2229- [ `crypto.createCipheriv()` ] : #crypto_crypto_createcipheriv_algorithm_key_iv
2230- [ `crypto.createDecipher()` ] : #crypto_crypto_createdecipher_algorithm_password
2231- [ `crypto.createDecipheriv()` ] : #crypto_crypto_createdecipheriv_algorithm_key_iv
2241+ [ `crypto.createCipher()` ] : #crypto_crypto_createcipher_algorithm_password_options
2242+ [ `crypto.createCipheriv()` ] : #crypto_crypto_createcipheriv_algorithm_key_iv_options
2243+ [ `crypto.createDecipher()` ] : #crypto_crypto_createdecipher_algorithm_password_options
2244+ [ `crypto.createDecipheriv()` ] : #crypto_crypto_createdecipheriv_algorithm_key_iv_options
22322245[ `crypto.createDiffieHellman()` ] : #crypto_crypto_creatediffiehellman_prime_primeencoding_generator_generatorencoding
22332246[ `crypto.createECDH()` ] : #crypto_crypto_createecdh_curvename
2234- [ `crypto.createHash()` ] : #crypto_crypto_createhash_algorithm
2235- [ `crypto.createHmac()` ] : #crypto_crypto_createhmac_algorithm_key
2236- [ `crypto.createSign()` ] : #crypto_crypto_createsign_algorithm
2237- [ `crypto.createVerify()` ] : #crypto_crypto_createverify_algorithm
2247+ [ `crypto.createHash()` ] : #crypto_crypto_createhash_algorithm_options
2248+ [ `crypto.createHmac()` ] : #crypto_crypto_createhmac_algorithm_key_options
2249+ [ `crypto.createSign()` ] : #crypto_crypto_createsign_algorithm_options
2250+ [ `crypto.createVerify()` ] : #crypto_crypto_createverify_algorithm_options
22382251[ `crypto.getCurves()` ] : #crypto_crypto_getcurves
22392252[ `crypto.getHashes()` ] : #crypto_crypto_gethashes
22402253[ `crypto.pbkdf2()` ] : #crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback
@@ -2252,6 +2265,8 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
22522265[ `hmac.update()` ] : #crypto_hmac_update_data_inputencoding
22532266[ `sign.sign()` ] : #crypto_sign_sign_privatekey_outputformat
22542267[ `sign.update()` ] : #crypto_sign_update_data_inputencoding
2268+ [ `stream.transform` options ] : stream.html#stream_new_stream_transform_options
2269+ [ `stream.Writable` options ] : stream.html#stream_constructor_new_stream_writable_options
22552270[ `tls.createSecureContext()` ] : tls.html#tls_tls_createsecurecontext_options
22562271[ `verify.update()` ] : #crypto_verifier_update_data_inputencoding
22572272[ `verify.verify()` ] : #crypto_verifier_verify_object_signature_signatureformat
0 commit comments