小编nam*_* do的帖子

找不到请求的对象。创建 X509certificate2 时

我正在尝试使用以下代码创建带有字符串的X509Certificate2private_key

 byte[] key = Convert.FromBase64String(private_key);
 X509Certificate2 certificate = new X509Certificate2(key);
Run Code Online (Sandbox Code Playgroud)

当最后一行执行时抛出以下异常:

System.Security.Cryptography.CryptographicException 找不到请求的对象

有谁知道如何解决这个问题?

c# cryptography x509certificate

5
推荐指数
1
解决办法
9263
查看次数

标签 统计

c# ×1

cryptography ×1

x509certificate ×1