Search code examples
c#certificateasn.1x509certificate2

Convert asn1 to base64 in C#


Is there a way to convert an ASN.1 encoded private key of X509Certificate into Base64 format, using C# code?


Solution

  • On second thought - probably I didn't understood your question on first answer. If you wanted to convert key data to format similar to .pem files you need to do something similar as in this article about generating .pem files