@@ -303,15 +303,15 @@ console.log(cert.verifySpkac(Buffer.from(spkac)));
303
303
// Prints: true or false
304
304
```
305
305
306
- ## Class: ` Cipher `
306
+ ## Class: ` Cipheriv `
307
307
308
308
<!-- YAML
309
309
added: v0.1.94
310
310
-->
311
311
312
312
* Extends: {stream.Transform}
313
313
314
- Instances of the ` Cipher ` class are used to encrypt data. The class can be
314
+ Instances of the ` Cipheriv ` class are used to encrypt data. The class can be
315
315
used in one of two ways:
316
316
317
317
* As a [ stream] [ ] that is both readable and writable, where plain unencrypted
@@ -320,10 +320,10 @@ used in one of two ways:
320
320
the encrypted data.
321
321
322
322
The [ ` crypto.createCipheriv() ` ] [ ] method is
323
- used to create ` Cipher ` instances. ` Cipher ` objects are not to be created
323
+ used to create ` Cipheriv ` instances. ` Cipheriv ` objects are not to be created
324
324
directly using the ` new ` keyword.
325
325
326
- Example: Using ` Cipher ` objects as streams:
326
+ Example: Using ` Cipheriv ` objects as streams:
327
327
328
328
``` mjs
329
329
const {
@@ -391,7 +391,7 @@ scrypt(password, 'salt', 24, (err, key) => {
391
391
});
392
392
```
393
393
394
- Example: Using ` Cipher ` and piped streams:
394
+ Example: Using ` Cipheriv ` and piped streams:
395
395
396
396
``` mjs
397
397
import {
@@ -538,7 +538,7 @@ added: v0.1.94
538
538
If ` outputEncoding ` is specified, a string is
539
539
returned. If an ` outputEncoding ` is not provided, a [ ` Buffer ` ] [ ] is returned.
540
540
541
- Once the ` cipher.final() ` method has been called, the ` Cipher ` object can no
541
+ Once the ` cipher.final() ` method has been called, the ` Cipheriv ` object can no
542
542
longer be used to encrypt data. Attempts to call ` cipher.final() ` more than
543
543
once will result in an error being thrown.
544
544
@@ -570,7 +570,7 @@ added: v1.0.0
570
570
* ` options ` {Object} [ ` stream.transform ` options] [ ]
571
571
* ` plaintextLength ` {number}
572
572
* ` encoding ` {string} The string encoding to use when ` buffer ` is a string.
573
- * Returns: {Cipher } The same ` Cipher ` instance for method chaining.
573
+ * Returns: {Cipheriv } The same ` Cipheriv ` instance for method chaining.
574
574
575
575
When using an authenticated encryption mode (` GCM ` , ` CCM ` , ` OCB ` , and
576
576
` chacha20-poly1305 ` are
@@ -590,9 +590,9 @@ added: v0.7.1
590
590
-->
591
591
592
592
* ` autoPadding ` {boolean} ** Default:** ` true `
593
- * Returns: {Cipher } The same ` Cipher ` instance for method chaining.
593
+ * Returns: {Cipheriv } The same ` Cipheriv ` instance for method chaining.
594
594
595
- When using block encryption algorithms, the ` Cipher ` class will automatically
595
+ When using block encryption algorithms, the ` Cipheriv ` class will automatically
596
596
add padding to the input data to the appropriate block size. To disable the
597
597
default padding call ` cipher.setAutoPadding(false) ` .
598
598
@@ -635,15 +635,15 @@ The `cipher.update()` method can be called multiple times with new data until
635
635
[ ` cipher.final() ` ] [ ] is called. Calling ` cipher.update() ` after
636
636
[ ` cipher.final() ` ] [ ] will result in an error being thrown.
637
637
638
- ## Class: ` Decipher `
638
+ ## Class: ` Decipheriv `
639
639
640
640
<!-- YAML
641
641
added: v0.1.94
642
642
-->
643
643
644
644
* Extends: {stream.Transform}
645
645
646
- Instances of the ` Decipher ` class are used to decrypt data. The class can be
646
+ Instances of the ` Decipheriv ` class are used to decrypt data. The class can be
647
647
used in one of two ways:
648
648
649
649
* As a [ stream] [ ] that is both readable and writable, where plain encrypted
@@ -652,10 +652,10 @@ used in one of two ways:
652
652
produce the unencrypted data.
653
653
654
654
The [ ` crypto.createDecipheriv() ` ] [ ] method is
655
- used to create ` Decipher ` instances. ` Decipher ` objects are not to be created
655
+ used to create ` Decipheriv ` instances. ` Decipheriv ` objects are not to be created
656
656
directly using the ` new ` keyword.
657
657
658
- Example: Using ` Decipher ` objects as streams:
658
+ Example: Using ` Decipheriv ` objects as streams:
659
659
660
660
``` mjs
661
661
import { Buffer } from ' node:buffer' ;
@@ -731,7 +731,7 @@ decipher.write(encrypted, 'hex');
731
731
decipher .end ();
732
732
```
733
733
734
- Example: Using ` Decipher ` and piped streams:
734
+ Example: Using ` Decipheriv ` and piped streams:
735
735
736
736
``` mjs
737
737
import {
@@ -848,7 +848,7 @@ added: v0.1.94
848
848
If ` outputEncoding ` is specified, a string is
849
849
returned. If an ` outputEncoding ` is not provided, a [ ` Buffer ` ] [ ] is returned.
850
850
851
- Once the ` decipher.final() ` method has been called, the ` Decipher ` object can
851
+ Once the ` decipher.final() ` method has been called, the ` Decipheriv ` object can
852
852
no longer be used to decrypt data. Attempts to call ` decipher.final() ` more
853
853
than once will result in an error being thrown.
854
854
@@ -870,7 +870,7 @@ changes:
870
870
* ` options ` {Object} [ ` stream.transform ` options] [ ]
871
871
* ` plaintextLength ` {number}
872
872
* ` encoding ` {string} String encoding to use when ` buffer ` is a string.
873
- * Returns: {Decipher } The same Decipher for method chaining.
873
+ * Returns: {Decipheriv } The same Decipher for method chaining.
874
874
875
875
When using an authenticated encryption mode (` GCM ` , ` CCM ` , ` OCB ` , and
876
876
` chacha20-poly1305 ` are
@@ -912,7 +912,7 @@ changes:
912
912
913
913
* ` buffer ` {string|Buffer|ArrayBuffer|TypedArray|DataView}
914
914
* ` encoding ` {string} String encoding to use when ` buffer ` is a string.
915
- * Returns: {Decipher } The same Decipher for method chaining.
915
+ * Returns: {Decipheriv } The same Decipher for method chaining.
916
916
917
917
When using an authenticated encryption mode (` GCM ` , ` CCM ` , ` OCB ` , and
918
918
` chacha20-poly1305 ` are
@@ -938,7 +938,7 @@ added: v0.7.1
938
938
-->
939
939
940
940
* ` autoPadding ` {boolean} ** Default:** ` true `
941
- * Returns: {Decipher } The same Decipher for method chaining.
941
+ * Returns: {Decipheriv } The same Decipher for method chaining.
942
942
943
943
When data has been encrypted without standard block padding, calling
944
944
` decipher.setAutoPadding(false) ` will disable automatic padding to prevent
@@ -3036,9 +3036,9 @@ changes:
3036
3036
* ` key ` {string|ArrayBuffer|Buffer|TypedArray|DataView|KeyObject|CryptoKey}
3037
3037
* ` iv ` {string|ArrayBuffer|Buffer|TypedArray|DataView|null}
3038
3038
* ` options ` {Object} [ ` stream.transform ` options] [ ]
3039
- * Returns: {Cipher }
3039
+ * Returns: {Cipheriv }
3040
3040
3041
- Creates and returns a ` Cipher ` object, with the given ` algorithm ` , ` key ` and
3041
+ Creates and returns a ` Cipheriv ` object, with the given ` algorithm ` , ` key ` and
3042
3042
initialization vector (` iv ` ).
3043
3043
3044
3044
The ` options ` argument controls stream behavior and is optional except when a
@@ -3106,9 +3106,9 @@ changes:
3106
3106
* ` key ` {string|ArrayBuffer|Buffer|TypedArray|DataView|KeyObject|CryptoKey}
3107
3107
* ` iv ` {string|ArrayBuffer|Buffer|TypedArray|DataView|null}
3108
3108
* ` options ` {Object} [ ` stream.transform ` options] [ ]
3109
- * Returns: {Decipher }
3109
+ * Returns: {Decipheriv }
3110
3110
3111
- Creates and returns a ` Decipher ` object that uses the given ` algorithm ` , ` key `
3111
+ Creates and returns a ` Decipheriv ` object that uses the given ` algorithm ` , ` key `
3112
3112
and initialization vector (` iv ` ).
3113
3113
3114
3114
The ` options ` argument controls stream behavior and is optional except when a
0 commit comments