@@ -20,7 +20,8 @@ function testCipher1(key, iv) {
2020 let txt = decipher . update ( ciph , 'hex' , 'utf8' ) ;
2121 txt += decipher . final ( 'utf8' ) ;
2222
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 } ` ) ;
2425
2526 // streaming cipher interface
2627 // NB: In real life, it's not guaranteed that you can get all of it
@@ -34,7 +35,8 @@ function testCipher1(key, iv) {
3435 dStream . end ( ciph ) ;
3536 txt = dStream . read ( ) . toString ( 'utf8' ) ;
3637
37- assert . strictEqual ( txt , plaintext , 'streaming cipher iv' ) ;
38+ assert . strictEqual ( txt , plaintext ,
39+ `streaming cipher with key ${ key } and iv ${ iv } ` ) ;
3840}
3941
4042
@@ -52,7 +54,8 @@ function testCipher2(key, iv) {
5254 let txt = decipher . update ( ciph , 'buffer' , 'utf8' ) ;
5355 txt += decipher . final ( 'utf8' ) ;
5456
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 } ` ) ;
5659}
5760
5861
@@ -71,7 +74,8 @@ function testCipher3(key, iv) {
7174 let deciph = decipher . update ( ciph , 'buffer' ) ;
7275 deciph = Buffer . concat ( [ deciph , decipher . final ( ) ] ) ;
7376
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 } ` ) ;
7579}
7680
7781testCipher1 ( '0123456789abcd0123456789' , '12345678' ) ;
0 commit comments