title: openssl_encrypt works also to decrypt
body: <p>I made a mistake in my code writting <code>openssl_encrypt</code> to decrypt my passwords and it works. So maybe a stupid question but it is the same function ?</p>
  
  <p>Here a test code:</p>
  
  <pre><code>$algo  = 'AES-256-CTR';
  $key = "1P4s5W0rd_or_4nyTh1ng_3L53";
  $ivlen=openssl_cipher_iv_length($algo);
  $iv = openssl_random_pseudo_bytes($ivlen);
  
  $data="test";
  $b64data=base64_encode($data);
  $encdata = openssl_encrypt($b64data,$algo,$key,OPENSSL_RAW_DATA,$iv);
  
  $b64decdata = openssl_encrypt($encdata,$algo,$key,OPENSSL_RAW_DATA,$iv);
  $decdata=base64_decode($b64decdata);
  
  print "&lt;br&gt;data: $data";
  print "&lt;br&gt;encdata: $encdata";
  print "&lt;br&gt;decdata: $decdata";
  print "&lt;br&gt;";
  print "&lt;br&gt;key: $key";
  print "&lt;br&gt;iv: $iv";
  </code></pre>
  
  <p>Which print:</p>
  
  <pre><code>data: test
  encdata: ��v�&gt;u
  decdata: test
  
  key: 1P4s5W0rd_or_4nyTh1ng_3L53
  iv: �|t,ԏ�&amp;6�����
  </code></pre>
  
  <p>So what's my mistake ? Where's the gremlin ?</p>