@@ -22,20 +22,20 @@ var encodings = ['binary', 'hex', 'base64'];
22
22
algorithms . forEach ( function ( algorithm ) {
23
23
encodings . forEach ( function ( encoding ) {
24
24
assertSame ( algorithm + ' hash using ' + encoding , function ( crypto , cb ) {
25
- cb ( null , crypto . createHash ( algorithm ) . update ( 'hello ' , 'utf-8' ) . digest ( encoding ) ) ;
25
+ cb ( null , crypto . createHash ( algorithm ) . update ( 'hellø ' , 'utf-8' ) . digest ( encoding ) ) ;
26
26
} )
27
27
28
28
assertSame ( algorithm + ' hmac using ' + encoding , function ( crypto , cb ) {
29
- cb ( null , crypto . createHmac ( algorithm , 'secret' ) . update ( 'hello ' , 'utf-8' ) . digest ( encoding ) )
29
+ cb ( null , crypto . createHmac ( algorithm , 'secret' ) . update ( 'hellø ' , 'utf-8' ) . digest ( encoding ) )
30
30
} )
31
31
} ) ;
32
32
33
33
assertSame ( algorithm + ' with raw binary' , function ( crypto , cb ) {
34
- var seed = 'hello ' ;
34
+ var seed = 'hellø ' ;
35
35
for ( var i = 0 ; i < 1000 ; i ++ ) {
36
- seed = crypto . createHash ( algorithm ) . update ( seed ) . digest ( 'binary' ) ;
36
+ seed = crypto . createHash ( algorithm ) . update ( new Buffer ( seed ) ) . digest ( 'binary' ) ;
37
37
}
38
- cb ( null , crypto . createHash ( algorithm ) . update ( seed ) . digest ( 'hex' ) ) ;
38
+ cb ( null , crypto . createHash ( algorithm ) . update ( new Buffer ( seed ) ) . digest ( 'hex' ) ) ;
39
39
} ) ;
40
40
41
41
assertSame ( algorithm + ' empty string' , function ( crypto , cb ) {
0 commit comments