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");