<?php
$string_to_encrypt = <<<END
This is a test
There a new lines and "quotes" in here.
I don't know whether this'll work!
END;
$password = '12345';
$iv = '1234567890123456';
$enc = openssl_encrypt($string_to_encrypt, 'AES-256-CBC', $password, 0, $iv);
echo openssl_decrypt($enc, 'AES-256-CBC', 'AES-256-CBC', $password, 0, $iv);
Fatal error: Uncaught Error: Call to undefined function openssl_encrypt() in /in/XJumc:13
Stack trace:
#0 {main}
thrown in /in/XJumc on line 13
Process exited with code 255.
Output for 7.1.0 - 7.1.10
Warning: openssl_decrypt(): IV passed is only 1 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/XJumc on line 15
Warning: openssl_decrypt(): The tag cannot be used because the cipher method does not support AEAD in /in/XJumc on line 15