@@ -25,7 +25,7 @@ function testCipher1(key) {
25
25
let txt = decipher . update ( ciph , 'hex' , 'utf8' ) ;
26
26
txt += decipher . final ( 'utf8' ) ;
27
27
28
- assert . strictEqual ( txt , plaintext , 'encryption and decryption' ) ;
28
+ assert . strictEqual ( txt , plaintext ) ;
29
29
30
30
// streaming cipher interface
31
31
// NB: In real life, it's not guaranteed that you can get all of it
@@ -39,7 +39,7 @@ function testCipher1(key) {
39
39
dStream . end ( ciph ) ;
40
40
txt = dStream . read ( ) . toString ( 'utf8' ) ;
41
41
42
- assert . strictEqual ( txt , plaintext , 'encryption and decryption with streams' ) ;
42
+ assert . strictEqual ( txt , plaintext ) ;
43
43
}
44
44
45
45
@@ -61,7 +61,7 @@ function testCipher2(key) {
61
61
let txt = decipher . update ( ciph , 'base64' , 'utf8' ) ;
62
62
txt += decipher . final ( 'utf8' ) ;
63
63
64
- assert . strictEqual ( txt , plaintext , 'encryption and decryption with Base64' ) ;
64
+ assert . strictEqual ( txt , plaintext ) ;
65
65
}
66
66
67
67
testCipher1 ( 'MySecretKey123' ) ;
@@ -125,17 +125,17 @@ testCipher2(Buffer.from('0123456789abcdef'));
125
125
let txt ;
126
126
assert . doesNotThrow ( ( ) => txt = decipher . update ( ciph , 'base64' , 'ucs2' ) ) ;
127
127
assert . doesNotThrow ( ( ) => txt += decipher . final ( 'ucs2' ) ) ;
128
- assert . strictEqual ( txt , plaintext , 'decrypted result in ucs2' ) ;
128
+ assert . strictEqual ( txt , plaintext ) ;
129
129
130
130
decipher = crypto . createDecipher ( 'aes192' , key ) ;
131
131
assert . doesNotThrow ( ( ) => txt = decipher . update ( ciph , 'base64' , 'ucs-2' ) ) ;
132
132
assert . doesNotThrow ( ( ) => txt += decipher . final ( 'ucs-2' ) ) ;
133
- assert . strictEqual ( txt , plaintext , 'decrypted result in ucs-2' ) ;
133
+ assert . strictEqual ( txt , plaintext ) ;
134
134
135
135
decipher = crypto . createDecipher ( 'aes192' , key ) ;
136
136
assert . doesNotThrow ( ( ) => txt = decipher . update ( ciph , 'base64' , 'utf-16le' ) ) ;
137
137
assert . doesNotThrow ( ( ) => txt += decipher . final ( 'utf-16le' ) ) ;
138
- assert . strictEqual ( txt , plaintext , 'decrypted result in utf-16le' ) ;
138
+ assert . strictEqual ( txt , plaintext ) ;
139
139
}
140
140
141
141
// setAutoPadding/setAuthTag/setAAD should return `this`
0 commit comments