Skip to content

Commit

Permalink
Update test/parallel/test-crypto-oneshot-hash.js
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
jelly and aduh95 authored Jan 11, 2025
1 parent 95b7ba6 commit a3edf40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/parallel/test-crypto-oneshot-hash.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ const methods = crypto.getHashes();
const input = fs.readFileSync(fixtures.path('utf8_test_text.txt'));

for (const method of methods) {
// Skip failing tests on OpenSSL 3.4.0
if (method.startsWith("shake") && common.hasOpenSSL(3, 4))
continue;
for (const outputEncoding of ['buffer', 'hex', 'base64', undefined]) {
// Skip failing tests on OpenSSL 3.4.0
if (method.startsWith("shake"))
continue;
const oldDigest = crypto.createHash(method).update(input).digest(outputEncoding || 'hex');
const digestFromBuffer = crypto.hash(method, input, outputEncoding);
assert.deepStrictEqual(digestFromBuffer, oldDigest,
Expand Down

0 comments on commit a3edf40

Please sign in to comment.