mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

PR-URL: https://github.com/nodejs/node/pull/59388 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>
22 lines
493 B
JavaScript
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();
|
|
}
|