title: How to convert string to base64 ASCII Embedded in c
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/342409/how-do-i-base64-encode-decode-in-c">How do I base64 encode (decode) in C?</a>  </p>
  </blockquote>
  
  
  
  <p>I am trying to convert an int into an ASCII byte array and then encode the byte array as a base64 string.  </p>
  
  <p>I see a few posts on how to do this in C# and Java, but I want to do this in C. I'm doing this in windows, using MS Visual Studio.  </p>
  
  <p>Is there a function provided that can do this?</p>
  
  <p>Here's the code that I would use in C# to do this:</p>
  
  <pre><code>var base64_string = Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(my_integer));
  </code></pre>