fedipage/lib/activitypub/utils/verifySignature.ts
Jeffrey Phillips Freeman 1afe272ca0
initial commit
2023-10-08 01:35:17 -04:00

14 lines
314 B
TypeScript

export function verifySignature(signature:any, publicKeyJson:any) {
let signatureValid;
try {
// Verify the signature
signatureValid = signature.verify(
publicKeyJson.publicKeyPem
);
} catch (error) {
console.log("Signature Verification error", error);
}
return signatureValid;
}