@@ -102,38 +102,38 @@ function runTests (name, compat) {
102
102
103
103
t . throws ( function ( ) {
104
104
compat . pbkdf2 ( [ 'a' ] , 'salt' , 1 , 32 , 'sha1' , function ( ) { } )
105
- } , / P a s s w o r d m u s t b e a b u f f e r o r s t r i n g / )
105
+ } , / P a s s w o r d m u s t b e a B u f f e r , U i n t 8 A r r a y o r s t r i n g / )
106
106
107
107
t . throws ( function ( ) {
108
108
compat . pbkdf2Sync ( [ 'a' ] , 'salt' , 1 , 32 , 'sha1' )
109
- } , / P a s s w o r d m u s t b e a b u f f e r o r s t r i n g / )
109
+ } , / P a s s w o r d m u s t b e a B u f f e r , U i n t 8 A r r a y o r s t r i n g / )
110
110
} )
111
111
112
112
tape ( name + ' should throw if the salt is not a buffer or string or Uint8Array' , function ( t ) {
113
113
t . plan ( 2 )
114
114
115
115
t . throws ( function ( ) {
116
116
compat . pbkdf2 ( 'pass' , [ 'salt' ] , 1 , 32 , 'sha1' )
117
- } , / S a l t m u s t b e a b u f f e r o r s t r i n g / )
117
+ } , / S a l t m u s t b e a B u f f e r , U i n t 8 A r r a y o r s t r i n g / )
118
118
119
119
t . throws ( function ( ) {
120
120
compat . pbkdf2Sync ( 'pass' , [ 'salt' ] , 1 , 32 , 'sha1' )
121
- } , / S a l t m u s t b e a b u f f e r o r s t r i n g / )
121
+ } , / S a l t m u s t b e a B u f f e r , U i n t 8 A r r a y o r s t r i n g / )
122
122
} )
123
123
124
124
var algos = [ 'sha1' , 'sha224' , 'sha256' , 'sha384' , 'sha512' , 'ripemd160' ]
125
125
algos . forEach ( function ( algorithm ) {
126
126
fixtures . valid . forEach ( function ( f ) {
127
127
var key , salt
128
128
if ( f . keyUint8Array ) {
129
- key = new Uint8Array ( f . keyuint8 )
129
+ key = new Uint8Array ( f . keyUint8Array )
130
130
} else if ( f . keyHex ) {
131
131
key = Buffer . from ( f . keyHex , 'hex' )
132
132
} else {
133
133
key = f . key
134
134
}
135
135
if ( f . saltUint8Array ) {
136
- salt = new Uint8Array ( f . saltuint8 )
136
+ salt = new Uint8Array ( f . saltUint8Array )
137
137
} else if ( f . saltHex ) {
138
138
salt = Buffer . from ( f . saltHex , 'hex' )
139
139
} else {
0 commit comments