2021-12-07 13:18:08 -05:00

8 lines
297 B
JavaScript

const crypto = require('crypto');
const [major, minor] = process.version.substr(1).split('.').map((x) => parseInt(x, 10));
const xofOutputLength = major > 12 || (major === 12 && minor >= 8);
const shake256 = xofOutputLength && crypto.getHashes().includes('shake256');
module.exports = shake256;