3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $textToEncrypt = "hello"; $encryptionMethod = "aes-256-cbc"; $secretHash = "123455"; $iv = "123456789012"; $encryptedMessage = openssl_encrypt($textToEncrypt, $encryptionMethod, $secretHash, 0, $iv); var_dump($encryptedMessage); $decryptedMessage = openssl_decrypt($encryptedMessage, $encryptionMethod, $secretHash, 0, $iv); echo $decryptedMessage;
Output for 5.4.45
Warning: openssl_encrypt(): IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/C8Jda on line 6 string(24) "NZI2N1qFCV+KSHqt+JRuKA==" Warning: openssl_decrypt(): IV passed is only 12 bytes long, cipher expects an IV of precisely 16 bytes, padding with \0 in /in/C8Jda on line 8 hello