@@ -1172,15 +1172,16 @@ added: v6.0.0
1172
1172
Property for checking and controlling whether a FIPS compliant crypto provider is
1173
1173
currently in use. Setting to true requires a FIPS build of Node.js.
1174
1174
1175
- ### crypto.createCipher(algorithm, password)
1175
+ ### crypto.createCipher(algorithm, password[ , options ] )
1176
1176
<!-- YAML
1177
1177
added: v0.1.94
1178
1178
-->
1179
1179
- ` algorithm ` {string}
1180
1180
- ` password ` {string | Buffer | TypedArray | DataView}
1181
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1181
1182
1182
1183
Creates and returns a ` Cipher ` object that uses the given ` algorithm ` and
1183
- ` password ` .
1184
+ ` password ` . Optional ` options ` argument controls stream behavior.
1184
1185
1185
1186
The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
1186
1187
recent 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
1206
1207
vulnerabilities. For the case when IV is reused in GCM, see [ Nonce-Disrespecting
1207
1208
Adversaries] [ ] for details.
1208
1209
1209
- ### crypto.createCipheriv(algorithm, key, iv)
1210
+ ### crypto.createCipheriv(algorithm, key, iv[ , options ] )
1210
1211
- ` algorithm ` {string}
1211
1212
- ` key ` {string | Buffer | TypedArray | DataView}
1212
1213
- ` iv ` {string | Buffer | TypedArray | DataView}
1214
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1213
1215
1214
1216
Creates 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.
1216
1218
1217
1219
The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
1218
1220
recent OpenSSL releases, ` openssl list-cipher-algorithms ` will display the
@@ -1240,15 +1242,16 @@ value.
1240
1242
Returns a ` tls.SecureContext ` , as-if [ ` tls.createSecureContext() ` ] [ ] had been
1241
1243
called.
1242
1244
1243
- ### crypto.createDecipher(algorithm, password)
1245
+ ### crypto.createDecipher(algorithm, password[ , options ] )
1244
1246
<!-- YAML
1245
1247
added: v0.1.94
1246
1248
-->
1247
1249
- ` algorithm ` {string}
1248
1250
- ` password ` {string | Buffer | TypedArray | DataView}
1251
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1249
1252
1250
1253
Creates and returns a ` Decipher ` object that uses the given ` algorithm ` and
1251
- ` password ` (key).
1254
+ ` password ` (key). Optional ` options ` argument controls stream behavior.
1252
1255
1253
1256
The implementation of ` crypto.createDecipher() ` derives keys using the OpenSSL
1254
1257
function [ ` 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
1262
1265
their own using [ ` crypto.pbkdf2() ` ] [ ] and to use [ ` crypto.createDecipheriv() ` ] [ ]
1263
1266
to create the ` Decipher ` object.
1264
1267
1265
- ### crypto.createDecipheriv(algorithm, key, iv)
1268
+ ### crypto.createDecipheriv(algorithm, key, iv[ , options ] )
1266
1269
<!-- YAML
1267
1270
added: v0.1.94
1268
1271
-->
1269
1272
- ` algorithm ` {string}
1270
1273
- ` key ` {string | Buffer | TypedArray | DataView}
1271
1274
- ` iv ` {string | Buffer | TypedArray | DataView}
1275
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1272
1276
1273
1277
Creates 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.
1275
1280
1276
1281
The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
1277
1282
recent OpenSSL releases, ` openssl list-cipher-algorithms ` will display the
@@ -1339,14 +1344,16 @@ predefined curve specified by the `curveName` string. Use
1339
1344
OpenSSL releases, ` openssl ecparam -list_curves ` will also display the name
1340
1345
and description of each available elliptic curve.
1341
1346
1342
- ### crypto.createHash(algorithm)
1347
+ ### crypto.createHash(algorithm[ , options ] )
1343
1348
<!-- YAML
1344
1349
added: v0.1.92
1345
1350
-->
1346
1351
- ` algorithm ` {string}
1352
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1347
1353
1348
1354
Creates 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.
1350
1357
1351
1358
The ` algorithm ` is dependent on the available algorithms supported by the
1352
1359
version of OpenSSL on the platform. Examples are ` 'sha256' ` , ` 'sha512' ` , etc.
@@ -1373,14 +1380,16 @@ input.on('readable', () => {
1373
1380
});
1374
1381
```
1375
1382
1376
- ### crypto.createHmac(algorithm, key)
1383
+ ### crypto.createHmac(algorithm, key[ , options ] )
1377
1384
<!-- YAML
1378
1385
added: v0.1.94
1379
1386
-->
1380
1387
- ` algorithm ` {string}
1381
1388
- ` key ` {string | Buffer | TypedArray | DataView}
1389
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1382
1390
1383
1391
Creates and returns an ` Hmac ` object that uses the given ` algorithm ` and ` key ` .
1392
+ Optional ` options ` argument controls stream behavior.
1384
1393
1385
1394
The ` algorithm ` is dependent on the available algorithms supported by the
1386
1395
version of OpenSSL on the platform. Examples are ` 'sha256' ` , ` 'sha512' ` , etc.
@@ -1409,25 +1418,29 @@ input.on('readable', () => {
1409
1418
});
1410
1419
```
1411
1420
1412
- ### crypto.createSign(algorithm)
1421
+ ### crypto.createSign(algorithm[ , options ] )
1413
1422
<!-- YAML
1414
1423
added: v0.1.92
1415
1424
-->
1416
1425
- ` algorithm ` {string}
1426
+ - ` options ` {Object} [ ` stream.Writable ` options] [ ]
1417
1427
1418
1428
Creates and returns a ` Sign ` object that uses the given ` algorithm ` .
1419
1429
Use [ ` 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.
1421
1432
1422
- ### crypto.createVerify(algorithm)
1433
+ ### crypto.createVerify(algorithm[ , options ] )
1423
1434
<!-- YAML
1424
1435
added: v0.1.92
1425
1436
-->
1426
1437
- ` algorithm ` {string}
1438
+ - ` options ` {Object} [ ` stream.Writable ` options] [ ]
1427
1439
1428
1440
Creates and returns a ` Verify ` object that uses the given algorithm.
1429
1441
Use [ ` 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.
1431
1444
1432
1445
### crypto.getCiphers()
1433
1446
<!-- YAML
@@ -2225,16 +2238,16 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
2225
2238
[ `UV_THREADPOOL_SIZE` ] : cli.html#cli_uv_threadpool_size_size
2226
2239
[ `cipher.final()` ] : #crypto_cipher_final_outputencoding
2227
2240
[ `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
2232
2245
[ `crypto.createDiffieHellman()` ] : #crypto_crypto_creatediffiehellman_prime_primeencoding_generator_generatorencoding
2233
2246
[ `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
2238
2251
[ `crypto.getCurves()` ] : #crypto_crypto_getcurves
2239
2252
[ `crypto.getHashes()` ] : #crypto_crypto_gethashes
2240
2253
[ `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.
2252
2265
[ `hmac.update()` ] : #crypto_hmac_update_data_inputencoding
2253
2266
[ `sign.sign()` ] : #crypto_sign_sign_privatekey_outputformat
2254
2267
[ `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
2255
2270
[ `tls.createSecureContext()` ] : tls.html#tls_tls_createsecurecontext_options
2256
2271
[ `verify.update()` ] : #crypto_verifier_update_data_inputencoding
2257
2272
[ `verify.verify()` ] : #crypto_verifier_verify_object_signature_signatureformat
0 commit comments