title: How to encode/encrypt secret data to be transferred by URL parameters?
body: <p>Here's the story:</p>
  
  <p>I have to pass some classified information from one script to another script. In the first script I need to encrypt the data first and then I <strong>have to</strong> attach the encrypted data into a GET request and send it to another script. The URL would look like this:</p>
  
  <pre><code>http://mydomain.com/mysecondscript.php?secret={encrypted stuff}
  </code></pre>
  
  <p>My current encrypt method is based on base64. The problem with this method is, that if I have a lot of stuff to encrypt, the encrypted result could get very long. If it's longer than 255 characters or so, the second script will not be able to decrypt it because the string will be chopped.</p>
  
  <p>So I'm looking for a better encryption method, that can control the length of the encrypted result.</p>