don't convert to hex in hashing

This commit is contained in:
Moon Man 2023-12-31 05:40:23 -05:00
parent e80fdbfaf2
commit a680d293c8
1 changed files with 1 additions and 1 deletions

View File

@ -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<Uint8Array>) => {