From 8a14eb1c4d4a6992cb158a1b32cb261bdb83e7e5 Mon Sep 17 00:00:00 2001 From: enpitsulin Date: Tue, 17 Dec 2024 15:35:01 +0800 Subject: [PATCH] fix: import 'node:crypto' --- src/crypto.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/crypto.ts b/src/crypto.ts index 1891ed9..5729768 100644 --- a/src/crypto.ts +++ b/src/crypto.ts @@ -1,6 +1,9 @@ +import { webcrypto } from 'node:crypto' import CryptoJS from 'crypto-js' import forge from 'node-forge' +const crypto = webcrypto + export async function md5(string: string) { return CryptoJS.MD5(string).toString() }