@@ -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
@@ -1202,13 +1203,14 @@ In line with OpenSSL's recommendation to use pbkdf2 instead of
1202
1203
their own using [ ` crypto.pbkdf2() ` ] [ ] and to use [ ` crypto.createCipheriv() ` ] [ ]
1203
1204
to create the ` Cipher ` object.
1204
1205
1205
- ### crypto.createCipheriv(algorithm, key, iv)
1206
+ ### crypto.createCipheriv(algorithm, key, iv[ , options ] )
1206
1207
- ` algorithm ` {string}
1207
1208
- ` key ` {string | Buffer | TypedArray | DataView}
1208
1209
- ` iv ` {string | Buffer | TypedArray | DataView}
1210
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1209
1211
1210
1212
Creates and returns a ` Cipher ` object, with the given ` algorithm ` , ` key ` and
1211
- initialization vector (` iv ` ).
1213
+ initialization vector (` iv ` ). Optional ` options ` argument controls stream behavior.
1212
1214
1213
1215
The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
1214
1216
recent OpenSSL releases, ` openssl list-cipher-algorithms ` will display the
@@ -1236,15 +1238,16 @@ value.
1236
1238
Returns a ` tls.SecureContext ` , as-if [ ` tls.createSecureContext() ` ] [ ] had been
1237
1239
called.
1238
1240
1239
- ### crypto.createDecipher(algorithm, password)
1241
+ ### crypto.createDecipher(algorithm, password[ , options ] )
1240
1242
<!-- YAML
1241
1243
added: v0.1.94
1242
1244
-->
1243
1245
- ` algorithm ` {string}
1244
1246
- ` password ` {string | Buffer | TypedArray | DataView}
1247
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1245
1248
1246
1249
Creates and returns a ` Decipher ` object that uses the given ` algorithm ` and
1247
- ` password ` (key).
1250
+ ` password ` (key). Optional ` options ` argument controls stream behavior.
1248
1251
1249
1252
The implementation of ` crypto.createDecipher() ` derives keys using the OpenSSL
1250
1253
function [ ` EVP_BytesToKey ` ] [ ] with the digest algorithm set to MD5, one
@@ -1258,16 +1261,18 @@ In line with OpenSSL's recommendation to use pbkdf2 instead of
1258
1261
their own using [ ` crypto.pbkdf2() ` ] [ ] and to use [ ` crypto.createDecipheriv() ` ] [ ]
1259
1262
to create the ` Decipher ` object.
1260
1263
1261
- ### crypto.createDecipheriv(algorithm, key, iv)
1264
+ ### crypto.createDecipheriv(algorithm, key, iv[ , options ] )
1262
1265
<!-- YAML
1263
1266
added: v0.1.94
1264
1267
-->
1265
1268
- ` algorithm ` {string}
1266
1269
- ` key ` {string | Buffer | TypedArray | DataView}
1267
1270
- ` iv ` {string | Buffer | TypedArray | DataView}
1271
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1268
1272
1269
1273
Creates and returns a ` Decipher ` object that uses the given ` algorithm ` , ` key `
1270
- and initialization vector (` iv ` ).
1274
+ and initialization vector (` iv ` ). Optional ` options ` argument controls stream
1275
+ behavior.
1271
1276
1272
1277
The ` algorithm ` is dependent on OpenSSL, examples are ` 'aes192' ` , etc. On
1273
1278
recent OpenSSL releases, ` openssl list-cipher-algorithms ` will display the
@@ -1335,14 +1340,16 @@ predefined curve specified by the `curveName` string. Use
1335
1340
OpenSSL releases, ` openssl ecparam -list_curves ` will also display the name
1336
1341
and description of each available elliptic curve.
1337
1342
1338
- ### crypto.createHash(algorithm)
1343
+ ### crypto.createHash(algorithm[ , options ] )
1339
1344
<!-- YAML
1340
1345
added: v0.1.92
1341
1346
-->
1342
1347
- ` algorithm ` {string}
1348
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1343
1349
1344
1350
Creates and returns a ` Hash ` object that can be used to generate hash digests
1345
- using the given ` algorithm ` .
1351
+ using the given ` algorithm ` . Optional ` options ` argument controls stream
1352
+ behavior.
1346
1353
1347
1354
The ` algorithm ` is dependent on the available algorithms supported by the
1348
1355
version of OpenSSL on the platform. Examples are ` 'sha256' ` , ` 'sha512' ` , etc.
@@ -1369,14 +1376,16 @@ input.on('readable', () => {
1369
1376
});
1370
1377
```
1371
1378
1372
- ### crypto.createHmac(algorithm, key)
1379
+ ### crypto.createHmac(algorithm, key[ , options ] )
1373
1380
<!-- YAML
1374
1381
added: v0.1.94
1375
1382
-->
1376
1383
- ` algorithm ` {string}
1377
1384
- ` key ` {string | Buffer | TypedArray | DataView}
1385
+ - ` options ` {Object} [ ` stream.transform ` options] [ ]
1378
1386
1379
1387
Creates and returns an ` Hmac ` object that uses the given ` algorithm ` and ` key ` .
1388
+ Optional ` options ` argument controls stream behavior.
1380
1389
1381
1390
The ` algorithm ` is dependent on the available algorithms supported by the
1382
1391
version of OpenSSL on the platform. Examples are ` 'sha256' ` , ` 'sha512' ` , etc.
@@ -1405,25 +1414,29 @@ input.on('readable', () => {
1405
1414
});
1406
1415
```
1407
1416
1408
- ### crypto.createSign(algorithm)
1417
+ ### crypto.createSign(algorithm[ , options ] )
1409
1418
<!-- YAML
1410
1419
added: v0.1.92
1411
1420
-->
1412
1421
- ` algorithm ` {string}
1422
+ - ` options ` {Object} [ ` stream.Writable ` options] [ ]
1413
1423
1414
1424
Creates and returns a ` Sign ` object that uses the given ` algorithm ` .
1415
1425
Use [ ` crypto.getHashes() ` ] [ ] to obtain an array of names of the available
1416
- signing algorithms.
1426
+ signing algorithms. Optional ` options ` argument controls the
1427
+ ` stream.Writable ` behavior.
1417
1428
1418
- ### crypto.createVerify(algorithm)
1429
+ ### crypto.createVerify(algorithm[ , options ] )
1419
1430
<!-- YAML
1420
1431
added: v0.1.92
1421
1432
-->
1422
1433
- ` algorithm ` {string}
1434
+ - ` options ` {Object} [ ` stream.Writable ` options] [ ]
1423
1435
1424
1436
Creates and returns a ` Verify ` object that uses the given algorithm.
1425
1437
Use [ ` crypto.getHashes() ` ] [ ] to obtain an array of names of the available
1426
- signing algorithms.
1438
+ signing algorithms. Optional ` options ` argument controls the
1439
+ ` stream.Writable ` behavior.
1427
1440
1428
1441
### crypto.getCiphers()
1429
1442
<!-- YAML
@@ -2221,16 +2234,16 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
2221
2234
[ `UV_THREADPOOL_SIZE` ] : cli.html#cli_uv_threadpool_size_size
2222
2235
[ `cipher.final()` ] : #crypto_cipher_final_outputencoding
2223
2236
[ `cipher.update()` ] : #crypto_cipher_update_data_inputencoding_outputencoding
2224
- [ `crypto.createCipher()` ] : #crypto_crypto_createcipher_algorithm_password
2225
- [ `crypto.createCipheriv()` ] : #crypto_crypto_createcipheriv_algorithm_key_iv
2226
- [ `crypto.createDecipher()` ] : #crypto_crypto_createdecipher_algorithm_password
2227
- [ `crypto.createDecipheriv()` ] : #crypto_crypto_createdecipheriv_algorithm_key_iv
2237
+ [ `crypto.createCipher()` ] : #crypto_crypto_createcipher_algorithm_password_options
2238
+ [ `crypto.createCipheriv()` ] : #crypto_crypto_createcipheriv_algorithm_key_iv_options
2239
+ [ `crypto.createDecipher()` ] : #crypto_crypto_createdecipher_algorithm_password_options
2240
+ [ `crypto.createDecipheriv()` ] : #crypto_crypto_createdecipheriv_algorithm_key_iv_options
2228
2241
[ `crypto.createDiffieHellman()` ] : #crypto_crypto_creatediffiehellman_prime_primeencoding_generator_generatorencoding
2229
2242
[ `crypto.createECDH()` ] : #crypto_crypto_createecdh_curvename
2230
- [ `crypto.createHash()` ] : #crypto_crypto_createhash_algorithm
2231
- [ `crypto.createHmac()` ] : #crypto_crypto_createhmac_algorithm_key
2232
- [ `crypto.createSign()` ] : #crypto_crypto_createsign_algorithm
2233
- [ `crypto.createVerify()` ] : #crypto_crypto_createverify_algorithm
2243
+ [ `crypto.createHash()` ] : #crypto_crypto_createhash_algorithm_options
2244
+ [ `crypto.createHmac()` ] : #crypto_crypto_createhmac_algorithm_key_options
2245
+ [ `crypto.createSign()` ] : #crypto_crypto_createsign_algorithm_options
2246
+ [ `crypto.createVerify()` ] : #crypto_crypto_createverify_algorithm_options
2234
2247
[ `crypto.getCurves()` ] : #crypto_crypto_getcurves
2235
2248
[ `crypto.getHashes()` ] : #crypto_crypto_gethashes
2236
2249
[ `crypto.pbkdf2()` ] : #crypto_crypto_pbkdf2_password_salt_iterations_keylen_digest_callback
@@ -2248,6 +2261,8 @@ the `crypto`, `tls`, and `https` modules and are generally specific to OpenSSL.
2248
2261
[ `hmac.update()` ] : #crypto_hmac_update_data_inputencoding
2249
2262
[ `sign.sign()` ] : #crypto_sign_sign_privatekey_outputformat
2250
2263
[ `sign.update()` ] : #crypto_sign_update_data_inputencoding
2264
+ [ `stream.transform` options ] : stream.html#stream_new_stream_transform_options
2265
+ [ `stream.Writable` options ] : stream.html#stream_constructor_new_stream_writable_options
2251
2266
[ `tls.createSecureContext()` ] : tls.html#tls_tls_createsecurecontext_options
2252
2267
[ `verify.update()` ] : #crypto_verifier_update_data_inputencoding
2253
2268
[ `verify.verify()` ] : #crypto_verifier_verify_object_signature_signatureformat
0 commit comments