Skip to content

Commit 834d364

Browse files
committed
fixup! crypto: support non-byte WebCrypto lengths and cSHAKE
1 parent ffa0349 commit 834d364

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/parallel/test-webcrypto-digest.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const assert = require('assert');
99
const { Buffer } = require('buffer');
1010
const { subtle } = globalThis.crypto;
1111
const { createHash, getHashes } = require('crypto');
12+
const { hasOpenSSL } = require('../common/crypto');
1213

1314
const kTests = [
1415
['SHA-1', ['sha1'], 160],
@@ -302,6 +303,8 @@ if (getHashes().includes('shake128')) {
302303
message: 'CShakeParams.customization must be at most 512 bytes',
303304
});
304305

306+
if (!hasOpenSSL(3)) return;
307+
305308
const nistCShakeShortInput = Buffer.from('00010203', 'hex');
306309
const nistCShakeLongInput =
307310
Buffer.from(Array.from({ length: 200 }, (_, i) => i));

0 commit comments

Comments
 (0)