coderrrrr.site/lib/activitypub/utils/verifySignature.js
2025-02-09 12:51:21 +00:00

17 lines
338 B
JavaScript

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