try to fix hashing
This commit is contained in:
parent
726c612b52
commit
504f76649b
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue