don't convert to hex in hashing
This commit is contained in:
parent
e80fdbfaf2
commit
a680d293c8
|
@ -3,7 +3,7 @@ import { createHash } from "node:crypto";
|
||||||
export const hashDigest = (payload: string | Buffer) =>
|
export const hashDigest = (payload: string | Buffer) =>
|
||||||
"sha-256="
|
"sha-256="
|
||||||
+ createHash("sha256")
|
+ createHash("sha256")
|
||||||
.update((Buffer.isBuffer(payload) ? payload : Buffer.from(payload)).toString("hex"))
|
.update(payload)
|
||||||
.digest("base64");
|
.digest("base64");
|
||||||
|
|
||||||
export const streamToString = async (stream: ReadableStream<Uint8Array>) => {
|
export const streamToString = async (stream: ReadableStream<Uint8Array>) => {
|
||||||
|
|
Loading…
Reference in New Issue