如何从x 509 v3证书获取私钥并将其存储在RSACryptoServiceProvider
类中?
答案 0 :(得分:1)
RSACryptoServiceProvider rsaCsp = (RSACryptoServiceProvider)x509certificateobject.PrivateKey;
假设您使用公钥,则只需将.PrivateKey
更改为.PublicKey
。
答案 1 :(得分:0)
RSACryptoServiceProvider rsaCsp = (RSACryptoServiceProvider)x509certificateobject.PrivateKey;