PHP Open SSL Decrypt Failing Inconsistently <p>I'm having some weird behaviour with the <code>openssl_decrypt</code> method in PHP. It's failing, giving me an error: <code>Unknown cipher algorithm</code>, but only <em>sometimes</em> (about 6:10 times) i.e. If I run the command enough times, it will eventually work... My code is: </p> <p><code>$result = openssl_decrypt(base64_decode($hash), 'AES-128-CBC', $timestamp);</code></p> <p>running <code>openssl list-cipher-commands</code> lists AES-128-CBC as one of the available cipher methods. The specs don't really list anything on the subject - only specifying that <code>unknown cipher algorithm</code> is a possible exception from running the command.</p> <p>edit: Using the command line: i.e. running <code>echo "soemthing" | openssl enc -aes-128-cbc</code> on a random machine and then decrypting on the machine that fails with the above <code>echo "..." | openssl enc -aes-128-cbc -d</code> works consistently.</p>