diff --git a/sign.js b/sign.js index 82bf526..aa0876d 100644 --- a/sign.js +++ b/sign.js @@ -9,7 +9,7 @@ const isNumber = require('lodash.isnumber'); const isPlainObject = require('lodash.isplainobject'); const isString = require('lodash.isstring'); const once = require('lodash.once'); -const { KeyObject, createSecretKey, createPrivateKey } = require('crypto') +const { KeyObject, createSecretKey, createPrivateKey } = require('node:crypto') const SUPPORTED_ALGS = ['RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'HS256', 'HS384', 'HS512', 'none']; if (PS_SUPPORTED) { diff --git a/verify.js b/verify.js index cdbfdc4..ee94e9d 100644 --- a/verify.js +++ b/verify.js @@ -6,7 +6,7 @@ const timespan = require('./lib/timespan'); const validateAsymmetricKey = require('./lib/validateAsymmetricKey'); const PS_SUPPORTED = require('./lib/psSupported'); const jws = require('jws'); -const {KeyObject, createSecretKey, createPublicKey} = require("crypto"); +const {KeyObject, createSecretKey, createPublicKey} = require("node:crypto"); const PUB_KEY_ALGS = ['RS256', 'RS384', 'RS512']; const EC_KEY_ALGS = ['ES256', 'ES384', 'ES512'];