diff options
Diffstat (limited to 'ext/node/polyfills/internal/crypto/hkdf.ts')
-rw-r--r-- | ext/node/polyfills/internal/crypto/hkdf.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/node/polyfills/internal/crypto/hkdf.ts b/ext/node/polyfills/internal/crypto/hkdf.ts index 50b64001f..8e09f6388 100644 --- a/ext/node/polyfills/internal/crypto/hkdf.ts +++ b/ext/node/polyfills/internal/crypto/hkdf.ts @@ -4,6 +4,12 @@ // TODO(petamoriken): enable prefer-primordials for node polyfills // deno-lint-ignore-file prefer-primordials +import { core } from "ext:core/mod.js"; +const { + op_node_hkdf, + op_node_hkdf_async, +} = core.ensureFastOps(); + import { validateFunction, validateInteger, @@ -31,12 +37,6 @@ import { isArrayBufferView, } from "ext:deno_node/internal/util/types.ts"; -const { core } = globalThis.__bootstrap; -const { ops } = core; -const { - op_node_hkdf_async, -} = core.ensureFastOps(); - const validateParameters = hideStackFrames((hash, key, salt, info, length) => { validateString(hash, "digest"); key = new Uint8Array(prepareKey(key)); @@ -134,7 +134,7 @@ export function hkdfSync( const okm = new Uint8Array(length); try { - ops.op_node_hkdf(hash, key, salt, info, okm); + op_node_hkdf(hash, key, salt, info, okm); } catch (e) { throw new ERR_CRYPTO_INVALID_DIGEST(e); } |