*sha512Sync has to be manually created
This commit is contained in:
parent
d7fe74cbce
commit
787baef9a0
|
@ -1,6 +1,9 @@
|
||||||
import { SignedRegistryEntry } from "./types.js";
|
import { SignedRegistryEntry } from "./types.js";
|
||||||
import * as ed from "@noble/ed25519";
|
import * as ed from "@noble/ed25519";
|
||||||
import b4a from "b4a";
|
import b4a from "b4a";
|
||||||
|
import { sha512 } from "@noble/hashes/sha512";
|
||||||
|
|
||||||
|
ed.utils.sha512Sync = (...m) => sha512(ed.utils.concatBytes(...m));
|
||||||
|
|
||||||
export function verifyEntry(entry: SignedRegistryEntry) {
|
export function verifyEntry(entry: SignedRegistryEntry) {
|
||||||
return ed.sync.verify(entry.signature, createSignatureData(entry), entry.pk);
|
return ed.sync.verify(entry.signature, createSignatureData(entry), entry.pk);
|
||||||
|
|
Reference in New Issue