From a680d293c85e29aee7b8a139fc16671a9ea2a943 Mon Sep 17 00:00:00 2001 From: Moon Man Date: Sun, 31 Dec 2023 05:40:23 -0500 Subject: [PATCH] don't convert to hex in hashing --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index 6e47273..07ddeaf 100644 --- a/src/util.ts +++ b/src/util.ts @@ -3,7 +3,7 @@ import { createHash } from "node:crypto"; export const hashDigest = (payload: string | Buffer) => "sha-256=" + createHash("sha256") - .update((Buffer.isBuffer(payload) ? payload : Buffer.from(payload)).toString("hex")) + .update(payload) .digest("base64"); export const streamToString = async (stream: ReadableStream) => {