Skip to content

Instantly share code, notes, and snippets.

@PaulStovell
Created August 7, 2013 02:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulStovell/6170588 to your computer and use it in GitHub Desktop.
Save PaulStovell/6170588 to your computer and use it in GitHub Desktop.
public static string ToBase64String(X509Certificate2 certificate)
{
byte[] exported = certificate.Export(X509ContentType.Pkcs12);
string encoded = Convert.ToBase64String(exported);
return encoded;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment