您的问题是
VerifyData方法的开始:
public static bool VerifyData(string originalMessage, string signedMessage, RSAParameters publicKey){ bool success = false; using (var rsa = new RSACryptoServiceProvider()) { //Don't do this, do the same as you did in Signdata: //byte[] bytesToVerify = Convert.Frombase64String(originalMessage); var enprer = new UTF8Encoding(); byte[] bytesToVerify = enprer.GetBytes(originalMessage); byte[] signedBytes = Convert.Frombase64String(signedMessage); try ...由于某些原因,您切换到
Frombase64String而不是
UTF8Encoding.GetBytes。



