@@ -20,7 +20,8 @@ function testCipher1(key, iv) {
20
20
let txt = decipher . update ( ciph , 'hex' , 'utf8' ) ;
21
21
txt += decipher . final ( 'utf8' ) ;
22
22
23
- assert . strictEqual ( txt , plaintext , 'encryption/decryption with key and iv' ) ;
23
+ assert . strictEqual ( txt , plaintext ,
24
+ `encryption/decryption with key ${ key } and iv ${ iv } ` ) ;
24
25
25
26
// streaming cipher interface
26
27
// NB: In real life, it's not guaranteed that you can get all of it
@@ -34,7 +35,8 @@ function testCipher1(key, iv) {
34
35
dStream . end ( ciph ) ;
35
36
txt = dStream . read ( ) . toString ( 'utf8' ) ;
36
37
37
- assert . strictEqual ( txt , plaintext , 'streaming cipher iv' ) ;
38
+ assert . strictEqual ( txt , plaintext ,
39
+ `streaming cipher with key ${ key } and iv ${ iv } ` ) ;
38
40
}
39
41
40
42
@@ -52,7 +54,8 @@ function testCipher2(key, iv) {
52
54
let txt = decipher . update ( ciph , 'buffer' , 'utf8' ) ;
53
55
txt += decipher . final ( 'utf8' ) ;
54
56
55
- assert . strictEqual ( txt , plaintext , 'encryption/decryption with key and iv' ) ;
57
+ assert . strictEqual ( txt , plaintext ,
58
+ `encryption/decryption with key ${ key } and iv ${ iv } ` ) ;
56
59
}
57
60
58
61
@@ -71,7 +74,8 @@ function testCipher3(key, iv) {
71
74
let deciph = decipher . update ( ciph , 'buffer' ) ;
72
75
deciph = Buffer . concat ( [ deciph , decipher . final ( ) ] ) ;
73
76
74
- assert ( deciph . equals ( plaintext ) , 'encryption/decryption with key and iv' ) ;
77
+ assert ( deciph . equals ( plaintext ) ,
78
+ `encryption/decryption with key ${ key } and iv ${ iv } ` ) ;
75
79
}
76
80
77
81
testCipher1 ( '0123456789abcd0123456789' , '12345678' ) ;
0 commit comments