title: Generate X.509 Certificate from Base64 string in Nodejs
body: <p>Suppose I have a Base64 certificate string and. </p>
  
  <p>I know how to generate a x509 certificate in <code>C#</code> code,</p>
  
  <pre><code>string base64CertificateString = "MIIxxxxxxxx....xxxx";
  string password = "xxxxxxxx";
  byte[] bytes = Convert.FromBase64String(base64CertificateString);
  X509Certificate2 x509certificate = new X509Certificate2(bytes, password, X509KeyStorageFlags.DefaultKeySet);
  </code></pre>
  
  <p>How can I do the same thing in <code>Nodejs</code>?</p>