From 504f76649bd7fe0c5f491320eff584f7909d9bb9 Mon Sep 17 00:00:00 2001 From: Moon Man Date: Wed, 27 Dec 2023 11:23:44 -0500 Subject: [PATCH] try to fix hashing --- src/util.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util.ts b/src/util.ts index 99bf59d..6e47273 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,10 +1,8 @@ import { createHash } from "node:crypto"; -const hasher = createHash("sha256"); - export const hashDigest = (payload: string | Buffer) => "sha-256=" - + hasher + + createHash("sha256") .update((Buffer.isBuffer(payload) ? payload : Buffer.from(payload)).toString("hex")) .digest("base64");