*sha512Sync has to be manually created

This commit is contained in:
Derrick Hammer 2022-12-31 14:55:19 -05:00
parent d7fe74cbce
commit 787baef9a0
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -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);