How to create the $key value for mcrypt_decrypt?
<p>I'm trying to decrypt a string using mcrypt_decrypt, but I'm not sure how to get the key into a 'string' type:</p>

<pre><code>$key = array(-2, -2, -2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2);
pkcs5_unpad(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $text, MCRYPT_MODE_CBC, $iv));
</code></pre>

<p>the key was generated using a random key generator, I used it on the encryption side (which happens to be java):</p>

<pre><code>byte[] key = new byte[] { -2, -2, -2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
</code></pre>

<p>bytes are signed, so having negative numbers should be legal - I'm just not sure how to use this with mcrypt_decrypt since it wants a 'string' type for $key?</p>

<p>Thanks</p>
