Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async verify({data, signature}) {
return chloride.crypto_sign_verify_detached(
Buffer.from(signature.buffer, signature.byteOffset, signature.length),
Buffer.from(data.buffer, data.byteOffset, data.length),
publicKey);
}
};
verify: function (publicKey, sig, message) {
return sodium.crypto_sign_verify_detached(sig, message, publicKey)
}