0

How to get private key from a x509 v.3 certificate and store it in a RSACryptoServiceProvider class?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
test_user
  • 11
  • 7

2 Answers2

1
RSACryptoServiceProvider rsaCsp = (RSACryptoServiceProvider)x509certificateobject.PrivateKey;

Suppose if you use public key then just change the .PrivateKey to .PublicKey.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Karthick
  • 256
  • 1
  • 4
  • 13
0
RSACryptoServiceProvider rsaCsp = (RSACryptoServiceProvider)x509certificateobject.PrivateKey;
cuongle
  • 74,024
  • 28
  • 151
  • 206
test_user
  • 11
  • 7