How do I get RSA public key from X509Certificate ?
From: Kishore (kishorerc@hotmail.com)
Date: 07/24/02
- Next message: Alex Jaquet: "Understanding application security in .NET"
- Previous message: Charly Peralta: "Is my ASP .NET App secure whith just this?"
- Next in thread: Allen Owen: "Re: How do I get RSA public key from X509Certificate ?"
- Reply: Allen Owen: "Re: How do I get RSA public key from X509Certificate ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Kishore" <kishorerc@hotmail.com> Date: Tue, 23 Jul 2002 21:10:24 -0700
Hi Everyone,
I have a X509Certificate, I want to get a RSA object using the public key
from the cert. Is this code correct ?
public RSA GetKey(X509Certificate cert)
{
RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
RSAParameters keyInfo = new RSAParameters();
keyInfo.Exponent = key;
keyInfo.Modulus = key;
rSA.ImportParameters(keyInfo);
return rsa;
}
Or should I use {1,0,1} for the Exponent ?
Thanks,
Kishore
- Next message: Alex Jaquet: "Understanding application security in .NET"
- Previous message: Charly Peralta: "Is my ASP .NET App secure whith just this?"
- Next in thread: Allen Owen: "Re: How do I get RSA public key from X509Certificate ?"
- Reply: Allen Owen: "Re: How do I get RSA public key from X509Certificate ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|