首页新闻找找看学习计划

C#控制台使用RSACryptoServiceProvider生成公钥私钥为啥报错--Operation is not supported on this platform.

0
悬赏园豆:10 [待解决问题]

public void GKEY()//(计算机)生成密钥 GKEY(generate key),generate the RSA public and private keys
{
using (RSACryptoServiceProvider rsa = new RSACryptoServiceProvider())
{
string publicKey = rsa.ToXmlString(false); // 公钥
string privateKey = rsa.ToXmlString(true); // 私钥
}
}
}

报错信息
System.PlatformNotSupportedException:“Operation is not supported on this platform.”

net
代码小六的主页 代码小六 | 初学一级 | 园豆:9
提问于:2019-08-05 16:25
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册