node/test/parallel/test-crypto-default-shake-lengths.js
Shelley Vohr 7a450272fb
test,crypto: skip unsupported ciphers
PR-URL: https://github.com/nodejs/node/pull/59388
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2025-08-09 17:18:51 +00:00

22 lines
493 B
JavaScript

'use strict';
const common = require('../common');
if (!common.hasCrypto)
common.skip('missing crypto');
const crypto = require('crypto');
if (!crypto.getHashes().includes('shake128')) {
common.skip('unsupported shake128 test');
}
const { createHash } = require('crypto');
common.expectWarning({
DeprecationWarning: {
DEP0198: 'Creating SHAKE128/256 digests without an explicit options.outputLength is deprecated.',
}
});
{
createHash('shake128').update('test').digest();
}