From d70ce45786530e6425445eea4eb7ac16f15819b4 Mon Sep 17 00:00:00 2001 From: jaybell Date: Sat, 30 Sep 2023 09:22:30 -0400 Subject: [PATCH] build: use node:crypto not crypto when importing --- src/md5.js | 2 +- src/native.js | 2 +- src/rng.js | 2 +- src/sha1.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/md5.js b/src/md5.js index cf692f4e..7e56496e 100644 --- a/src/md5.js +++ b/src/md5.js @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; function md5(bytes) { if (Array.isArray(bytes)) { diff --git a/src/native.js b/src/native.js index 14f8b8f3..fb372ebc 100644 --- a/src/native.js +++ b/src/native.js @@ -1,3 +1,3 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; export default { randomUUID: crypto.randomUUID }; diff --git a/src/rng.js b/src/rng.js index cdd4cfa7..ce2c7160 100644 --- a/src/rng.js +++ b/src/rng.js @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate let poolPtr = rnds8Pool.length; diff --git a/src/sha1.js b/src/sha1.js index bb46cbea..c5773362 100644 --- a/src/sha1.js +++ b/src/sha1.js @@ -1,4 +1,4 @@ -import crypto from 'crypto'; +import crypto from 'node:crypto'; function sha1(bytes) { if (Array.isArray(bytes)) {