Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

VerifyData signed with "SHA256withRSA" algoritm always return false.

$
0
0

The SignedString is generated by "eid-web-applet-1.0-20121010.132118-1.jar" whit the algoritm "SHA256withRSA"

This is the code I use, but I d0n't understand why it returns me always false :

RSACryptoServiceProviderrsaCripto=(RSACryptoServiceProvider)certUserC.PublicKey.Key;

byte[]signedBytes=Convert.FromBase64String(SignedString)     

byte[]bytesToVerify=byteConverterUTF8.GetBytes(originalString);                

RSACryptoServiceProviderp=newRSACryptoServiceProvider();

 p.FromXmlString(publicKey);

          

SHA256mySHA256=SHA256Managed.Create();

  

bool verified=p.VerifyData(bytesToVerify,mySHA256,signedBytes);

               



Edoardo Molinaro Product Specialist E-Mail: edo106@gmail.com






Edoardo Molinaro Product Specialist E-Mail: edo106@gmail.com


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>