RSAPKCS1SignatureDeformatter equivalent in node js

时间:2017-08-04 12:31:51

标签: c# node.js jwt

What is the equivalent of following in nodejs ?

RSAPKCS1SignatureDeformatter rsaDeformatter = new RSAPKCS1SignatureDeformatter(rsa);
rsaDeformatter.SetHashAlgorithm("SHA256");
bool validSignature = rsaDeformatter.VerifySignature(hash, signaturePart)

Need equivalent of the following, I am using same code for the token verification: http://techqa.info/programming/tag/jwt?after=38311108

1 个答案:

答案 0 :(得分:0)

看看这个Node.js示例,看看它是否对您有所帮助:

(Node.js) Verify JWT Using an RSA Public Key (RS256, RS384, RS512)