Re: wodCrypt Sign, C# Verifies signature (General questions)
C# code that verifies signature: [code] String publickey = <RSAKeyValue><Modulus>26NtFkEYNumpdM9/1Ie+TnoBaOCi6ZtGdrfFcFP7Aq/0zSt2iLPeu1mIwpO4x445mdsm3D+R5fgF/5bdSXPmh7QpeElG5GbkCO6YnLRoktOLu2TtEME59ripyMVeM8xahJj+8BnkKsZrwj2mPFlYxmc+DBIuRGm3f8FfDf5kpmc=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue> ;
String signature = IRH1ZMSKABNYFS/NRIIrG9LJ03aQ3oQ3qifW9qjI0tdJO/cDCP+f4FLUKCzoRpHb7hkoJpy9yKUX6nhQCtKd/sL9WfYbZwbKhB0oVja/qrN3XprFcqi+qLZ9qcbibkLT1hiJiDCUxCg61sGwfTjEoINcVX/4T4CxveSH1HKzDZI= ;
CspParameters cspParam;
cspParam= new CspParameters();
cspParam.Flags = CspProviderFlags.UseMachineKeyStore;
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider(cspParam);
RSA.FromXmlString(publickey);
byte[] StrAsByte= System.Text.Encoding.Default.GetBytes( ABCD );
byte[] SigBytes = System.Convert.FromBase64String(signature);
if (RSA.VerifyData(StrAsByte, MD5 , SigBytes))
Console.Write( Success );
else
Console.Write( Failure );
[/code]
Complete thread:
- wodCrypt Sign, C# Verifies signature - wodSupport, 2005-01-17, 03:02
- Re: wodCrypt Sign, C# Verifies signature - wodSupport, 2005-01-17, 03:06