views:

67

answers:

1

Hi,

I have to read a private key, and this key is on pvk format. I use X509Certificate2 class, but i this class i have only public key access. How can i get a private key from pvk file?

thanks Luiz Costa

+1  A: 

http://msdn.microsoft.com/en-us/library/system.security.cryptography.x509certificates.x509certificate2.privatekey.aspx

How about this ?

Have in mind:

Currently this property supports only RSA or DSA keys, so it returns either an RSACryptoServiceProvider or a DSACryptoServiceProvider object. If no private key is associated with the certificate, a null reference (Nothing in Visual Basic) is returned

anthares