1
如何從.pfx文件導入證書的私鑰?我有這樣的代碼:從.pfx文件導入私鑰
X509Certificate2 cert = new X509Certificate2("C:/amazon.pfx", "hello", X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
string private_key = cert.PrivateKey.ToString();
Console.WriteLine(private_key);
但是,輸出是:
System.Security.Cryptography.RSACryptoServiceProvider
我怎樣才能在字符串格式的私鑰?