Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const signAlgoDemo = async () => {
console.log('signAlgoDemo')
const keys = await RSA.generate()
const signature = await RSA.signWithAlgorithm(secret, keys.private, RSA.SHA256withRSA)
console.log('signature', signature);
const valid = await RSA.verifyWithAlgorithm(signature, secret, keys.public, RSA.SHA256withRSA)
console.log('verified', valid);
}