Files
k8s-set-context/node_modules/oidc-token-hash/lib/shake256.js
github-actions[bot] 52d71d28bd Add node modules and compiled JavaScript from main (#54)
Co-authored-by: Oliver King <oking3@uncc.edu>
2022-06-29 15:41:55 -04: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;