title: Certificate Transparency Logs for C#
body: <p>Currently working on a certificate transparency logs. My goal is to read each log just like what <a href="https://certstream.calidog.io/" rel="nofollow noreferrer">CertStream</a> - (Open the fire hose button) did, my boss wants to create another one that is written in C#. Just a simple code to parse the logs can really help me. Not necessarily as fancy as CertStream does its stuff.</p>
  <p><strong>These are the following links/APIs that I've read:</strong>
  (API's from Google or related)</p>
  <ul>
  <li><a href="https://ct.googleapis.com/pilot/ct/v1/get-sth" rel="nofollow noreferrer">https://ct.googleapis.com/pilot/ct/v1/get-sth</a></li>
  <li><a href="https://ct.googleapis.com/logs/argon2020/ct/v1/get-entries?start=20200201&amp;end=20200205" rel="nofollow noreferrer">https://ct.googleapis.com/logs/argon2020/ct/v1/get-entries?start=20200201&amp;end=20200205</a></li>
  <li><a href="https://www.rfc-editor.org/rfc/rfc6962" rel="nofollow noreferrer">https://www.rfc-editor.org/rfc/rfc6962</a></li>
  </ul>
  <p>Valuable info:</p>
  <ul>
  <li><a href="https://certstream.calidog.io/" rel="nofollow noreferrer">https://certstream.calidog.io/</a></li>
  <li><a href="https://stackoverflow.com/questions/59772797/cant-parse-precertificate-from-certificate-transparency-log">https://stackoverflow.com/questions/59772797/cant-parse-precertificate-from-certificate-transparency-log</a></li>
  </ul>
  <p>For the code I started,</p>
  <pre><code> byte[] byte_LeafInput = Convert.FromBase64String(leaf_input);
   byte[] byte_extradata = Convert.FromBase64String(extra_data);
   string strLeafInput = Encoding.UTF8.GetString(byte_LeafInput);
   string strExtraData = Encoding.UTF8.GetString(byte_extradata);
  </code></pre>
  <p>But it only shows some gibberish data with few readable words.
  <a href="https://i.stack.imgur.com/o7DZX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o7DZX.png" alt="enter image description here" /></a></p>
  <p>Any codes or libraries that can help me with that? Upon searching, I found so many codes written in different languages like Python, Go, etc., but based on what I understand in their code, they are also using libraries which is not available in NuGet. X509Certificate might be useful but I don't know how to use it in this case.</p>
  <p>Any lead would really be appreciated. Thank you.</p>