diff --git a/src/utils.ts b/src/utils.ts index f5a3c4c..9d49d76 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,6 +1,9 @@ import { SignedRegistryEntry } from "./types.js"; import * as ed from "@noble/ed25519"; import b4a from "b4a"; +import { sha512 } from "@noble/hashes/sha512"; + +ed.utils.sha512Sync = (...m) => sha512(ed.utils.concatBytes(...m)); export function verifyEntry(entry: SignedRegistryEntry) { return ed.sync.verify(entry.signature, createSignatureData(entry), entry.pk);