title: encrypt and decrypt in php not working
body: <p>Original URL </p>
  
  <pre><code>/category.php?id=28
  </code></pre>
  
  <p>After encryptiong </p>
  
  <pre><code>/category.php?id=DyAtftpy3cg4RNtJWT51vFlU5fMVuN+bvaTC365XYkU=
  
  function encryptIt( $q ) {
      $cryptKey  = 'qJB0rGtIn5UB1xG03efyCp';
      $qEncoded      = base64_encode( mcrypt_encrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), $q, MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ) );
      return $qEncoded;
  }
  </code></pre>
  
  <p><strong>decrypt</strong></p>
  
  <pre><code>decryptIt($_REQUEST['id']);
  </code></pre>
  
  <p>used function</p>
  
  <pre><code>function decryptIt( $q ) {
      $cryptKey  = 'qJB0rGtIn5UB1xG03efyCp';
      $qDecoded      = rtrim( mcrypt_decrypt( MCRYPT_RIJNDAEL_256, md5( $cryptKey ), base64_decode( $q ), MCRYPT_MODE_CBC, md5( md5( $cryptKey ) ) ), "\0");
      return $qDecoded;
  }
  </code></pre>
  
  <p>But it returns <code>���.�_��JC �\Y|{�[=4�V!�o$��</code></p>