this is part of my code project: (who should save the public key to a file)
var certif_dsa = new X509Certificate2 (certat_dsa, "password");
var pubkey_dsa = certif_dsa.GetPublicKeyString ();
StreamWriter fluxInfos_dsa = null; // le fichier de la clé publique trouver le au debug
using (fluxInfos_dsa = new StreamWriter("CléPub.txt"))
{
string ligne = " **** Le fichier de clé publique : ***** ";
fluxInfos_dsa.WriteLine(ligne);
fluxInfos_dsa.WriteLine();
fluxInfos_dsa.WriteLine("début : ");
fluxInfos_dsa.WriteLine(pubkey_dsa);
fluxInfos_dsa.WriteLine();
fluxInfos_dsa.WriteLine();
fluxInfos_dsa.WriteLine(" Fin de la clé publique. ");
}
fluxInfos_dsa.Close();
aliah32@hotmail.fr