title: Why would 00 in data break UTF-16 encode / OpenSSL?
body: <p>I'm working on a PHP login that takes an ID and logs them in elsewhere after the user is already authenticated. It works for every single ID except three of them, and they all have something in common: They all start with two zeros (e.g.: 0012).</p>
  
  <p>I'm wondering if a double zero holds a special place in the encoding, like a delimiter? Or something to do with OpenSSL? It only breaks on those three. Doesn't matter if I treat the data as a string or an integer, it breaks both ways. Any ideas?</p>
  
  <p>Code (modified slightly):</p>
  
  <pre><code>            $fp = fopen("/OpenSSL-Win64/bin/myrsakey.pem", "r");
              $priv_key = fread($fp, 8192) or die("File not found."); 
              fclose($fp);
  
              $pkeyid = openssl_get_privatekey($priv_key);
  
              $data = '0012'; // THIS DOESN'T WORK
              $data = '0123'; // THIS DOES WORK
              $data = '1234'; // THIS ALSO WORKS
  
              $data = mb_convert_encoding($data, "UTF-16LE");
  
              openssl_sign($data, $signature, $pkeyid, OPENSSL_ALGO_SHA1); 
              openssl_free_key($pkeyid); 
  </code></pre>