RSA解密报错:该项不存在
//要解密的字符串
string text = "L9gKL7QyjiyWisM0YPiP2Kq9jSV7EQe7VNJNEKU3HJv4//HSBoiClrFM/PdD0Kj9j6keJe65ggEshW3vVoYq8fpLiL5omIBCGYIZxXrP5lK9TqtJRFxzjUykRa6MTAxTVTFe1zbIwwDtQiS29rBx+c3PGIk4Nt/wn/tAHzlhADE= ";
//获取证书的公钥
string aa = DataCertificate.GetCertificateFromStore("CN=tnt, CN=com, CN=cn, O=TNT Express, L=Shanghai, C=CN").PublicKey.Key.ToXmlString(false);
RSACryptoServiceProvider provider = new RSACryptoServiceProvider();
provider.FromXmlString(aa);
byte[] rgb = Convert.FromBase64String(text);
byte[] bytes = provider.Decrypt(rgb, false);//这里报错,该项不存在
string result = new UnicodeEncoding().GetString(bytes);
请问是什么原因导致报错的.
------解决方案--------------------应该是公钥加密,私钥解密的说