title: Encode URL from C#, decrypt URL in PHP (extra characters being added somehow)
body: <p>I have read so many topics on this very subject by now, I can't understand where the issue could possibly lie. I am encrypting part of a URL from a C# winform application. I then want to read in the URL using php and decrypt the url (all using base-64). I do have some code to shrae:</p>
  <br>
  <h2>Code to encrypt URL (C#):</h2>
  <pre><code>public static string Base64Encode(string str)
  {
      byte[] encbuff = Encoding.UTF8.GetBytes(str);
      return System.Web.HttpServerUtility.UrlTokenEncode(encbuff);
  }
  </code></pre>
  <p><strong> Decrypt a section of the URL: </strong></p>
  <pre><code>Base64Encode(&quot;CND0311J4S68CCU Ver. F.0BHPQOEM - f&quot;);
  </code></pre>
  <p><strong> Returns:</strong></p>
  <pre><code>Q05EMDMxMUo0UzY4Q0NVIFZlci4gRi4wQkhQUU9FTSAtIGY1
  </code></pre>
  <br>
  <h2>Code to decrypt URL (PHP):</h2>
  <pre><code>echo base64_decode(&quot;Q05EMDMxMUo0UzY4Q0NVIFZlci4gRi4wQkhQUU9FTSAtIGY1&quot;);
  </code></pre>
  <p><strong>Returns:</strong></p>
  <pre><code>CND0311J4S68CCU Ver. F.0BHPQOEM - f5
  </code></pre>
  <p>So, where is the extra &quot;5&quot; at the end of the return coming from? I cannot figure this out for the life of me, quite frustrating as you could imagine.</p>
  <p>I appreciate any help with this - as well as any suggestions!</p>
  <p>Thank you,</p>
  <p>Evan</p>