Skip to content

Commit 3fd0f18

Browse files
authored
build: use node:crypto not crypto when importing (#736)
1 parent 1faad97 commit 3fd0f18

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/md5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import crypto from 'crypto';
1+
import crypto from 'node:crypto';
22

33
function md5(bytes) {
44
if (Array.isArray(bytes)) {

src/native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import crypto from 'crypto';
1+
import crypto from 'node:crypto';
22

33
export default { randomUUID: crypto.randomUUID };

src/rng.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import crypto from 'crypto';
1+
import crypto from 'node:crypto';
22

33
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
44
let poolPtr = rnds8Pool.length;

src/sha1.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import crypto from 'crypto';
1+
import crypto from 'node:crypto';
22

33
function sha1(bytes) {
44
if (Array.isArray(bytes)) {

0 commit comments

Comments
 (0)