UNPKG

@jc-lab/jose

Version:

JSON Web Almost Everything - JWA, JWS, JWE, JWK, JWT, JWKS for Node.js with minimal dependencies

10 lines (7 loc) 309 B
const { KeyObject, sign, verify } = require('crypto') const [major, minor] = process.version.substr(1).split('.').map(x => parseInt(x, 10)) module.exports = { oaepHashSupported: major > 12 || (major === 12 && minor >= 9), keyObjectSupported: !!KeyObject, edDSASupported: !!sign && !!verify }