@@ -8,7 +8,6 @@ const assert = require('assert');
8
8
const crypto = require ( 'crypto' ) ;
9
9
const fs = require ( 'fs' ) ;
10
10
11
- const { hasOpenSSL } = require ( '../common/crypto' ) ;
12
11
const fixtures = require ( '../common/fixtures' ) ;
13
12
14
13
let cryptoType ;
@@ -184,21 +183,19 @@ assert.throws(
184
183
185
184
// Test XOF hash functions and the outputLength option.
186
185
{
187
- // Default outputLengths. Since OpenSSL 3.4 an outputLength is mandatory
188
- if ( ! hasOpenSSL ( 3 , 4 ) ) {
189
- assert . strictEqual ( crypto . createHash ( 'shake128' ) . digest ( 'hex' ) ,
190
- '7f9c2ba4e88f827d616045507605853e' ) ;
191
- assert . strictEqual ( crypto . createHash ( 'shake128' , null ) . digest ( 'hex' ) ,
192
- '7f9c2ba4e88f827d616045507605853e' ) ;
193
- assert . strictEqual ( crypto . createHash ( 'shake256' ) . digest ( 'hex' ) ,
194
- '46b9dd2b0ba88d13233b3feb743eeb24' +
195
- '3fcd52ea62b81b82b50c27646ed5762f' ) ;
196
- assert . strictEqual ( crypto . createHash ( 'shake256' , { outputLength : 0 } )
197
- . copy ( ) // Default outputLength.
198
- . digest ( 'hex' ) ,
199
- '46b9dd2b0ba88d13233b3feb743eeb24' +
200
- '3fcd52ea62b81b82b50c27646ed5762f' ) ;
201
- }
186
+ // Default outputLengths.
187
+ assert . strictEqual ( crypto . createHash ( 'shake128' ) . digest ( 'hex' ) ,
188
+ '7f9c2ba4e88f827d616045507605853e' ) ;
189
+ assert . strictEqual ( crypto . createHash ( 'shake128' , null ) . digest ( 'hex' ) ,
190
+ '7f9c2ba4e88f827d616045507605853e' ) ;
191
+ assert . strictEqual ( crypto . createHash ( 'shake256' ) . digest ( 'hex' ) ,
192
+ '46b9dd2b0ba88d13233b3feb743eeb24' +
193
+ '3fcd52ea62b81b82b50c27646ed5762f' ) ;
194
+ assert . strictEqual ( crypto . createHash ( 'shake256' , { outputLength : 0 } )
195
+ . copy ( ) // Default outputLength.
196
+ . digest ( 'hex' ) ,
197
+ '46b9dd2b0ba88d13233b3feb743eeb24' +
198
+ '3fcd52ea62b81b82b50c27646ed5762f' ) ;
202
199
203
200
// Short outputLengths.
204
201
assert . strictEqual ( crypto . createHash ( 'shake128' , { outputLength : 0 } )
0 commit comments