summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/components
diff options
context:
space:
mode:
Diffstat (limited to 'vhosts/blog/nuldoc-src/components')
-rw-r--r--vhosts/blog/nuldoc-src/components/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/vhosts/blog/nuldoc-src/components/utils.ts b/vhosts/blog/nuldoc-src/components/utils.ts
index f0de71f1..5d57d033 100644
--- a/vhosts/blog/nuldoc-src/components/utils.ts
+++ b/vhosts/blog/nuldoc-src/components/utils.ts
@@ -1,4 +1,4 @@
-import { crypto, toHashString } from "std/crypto/mod.ts";
+import { Hash } from "checksum/mod.ts";
import { join } from "std/path/mod.ts";
import { Config } from "../config.ts";
import { el, Element } from "../dom.ts";
@@ -25,6 +25,6 @@ export async function staticScriptElement(
async function calculateFileHash(
filePath: string,
): Promise<string> {
- const content = (await Deno.readFile(filePath)).buffer;
- return toHashString(await crypto.subtle.digest("MD5", content), "hex");
+ const content = await Deno.readFile(filePath);
+ return new Hash("md5").digest(content).hex();
}