3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tempToken = "eb97ed62-ef2b-4f4d-973a-a492a5a74f694d9297e2-ffef-4ee8-8df4-ffabdac2e3f0"; $clearText = "AuthToken=eb97ed62-ef2b-4f4d-973a-a492a5a74f694d9297e2-ffef-4ee8-8df4-ffabdac2e3f0&PayerId=2651346885082349&PaymentProcessType=CreditCard&ProcessMethod=None&PaymentMethodStorageOption=None&ReturnURL=https://il01addproc.propay.com:443/Return.aspx "; // $tempToken = "1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5"; // $clearText = "AuthToken=1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5&PayerID=2833955147881261&Amount=10.00&CurrencyCode=USD&ProcessMethod=Capture&PaymentMethodStorageOption=None&InvoiceNumber=Invoice123&Comment1=comment1&Comment2=comment2&echo=echotest&ReturnURL=https://il01addproc.propay.com:443/Return.aspx&ProfileId=3351&PaymentProcessType=CreditCard&StandardEntryClassCode=&DisplayMessage=True&Protected=False"; echo md5($clearText) . "\n"; // Encode the TempToken string in UTF-8 $encodedTempToken = utf8_encode($tempToken); // Get the MD5 hash of $encodedTempToken in raw binary format with a length of 16 $md5Hash = md5($encodedTempToken, TRUE); // Encode the name value string in UTF-8 $encodedNameValueString = utf8_encode($clearText); echo md5($encodedNameValueString) . "\n"; // Pad the name value string using pkcs5_pad $blocksize = mcrypt_get_block_size('rijndael_128', 'cbc'); $pad = $blocksize - (strlen($encodedNameValueString) % $blocksize); $encodedNameValueString = $encodedNameValueString . str_repeat(chr($pad), $pad); echo md5($encodedNameValueString) . "\n"; // Use AES-128 encryption to encrypt the name value string with the key and IV both being equal to the MD5 hash of $encodedTempToken $aes128 = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $md5Hash, $encodedNameValueString, MCRYPT_MODE_CBC, $md5Hash); echo md5($aes128) . "\n"; // Use Base64 encoding to send the resulting bytes of the encrypted name value string $settingsCipher = base64_encode($aes128); echo $settingsCipher;
Output for 7.0.6 - 7.1.0
801a0b4c58e90c84dc40475c3a44764d 801a0b4c58e90c84dc40475c3a44764d Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /in/A2BUh:25 Stack trace: #0 {main} thrown in /in/A2BUh on line 25
Process exited with code 255.
Output for 5.4.34 - 5.5.34, 5.6.8 - 5.6.20, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.0.5
801a0b4c58e90c84dc40475c3a44764d 801a0b4c58e90c84dc40475c3a44764d 713d8363c94cc10d25b084ed12d6f752 6ef17c89e376118abe5ef63fef287521 Ej4yT4Gt1SvHaJbA3qw1iceTED0lW1yU8Ek5t69/1GevR0X3kkOzSZFnIs61HM2dqeV+gHjZjrHehk+Br7pQgiGgvP85hao/iCqHTp/ZsTfbsFpLzBLd8D+UnxF18VvC1VuOmLCC1STJeOry+GEOiz2E7PmTSejRQndKjHEWJ79vR/W6xBYws+zScggiNLSpp196bdl4k/ET9hoQYXbtgLXLohzkrC9AyIvy/PkHiMKYqoSb9HP53Ycub1rSbXm8Sr9r+Pi5UZ658LjNZynpfhCOKoVLKshNyJPo5k6VXiSDww9YQ5cfQ67aH+MVa1ZxcYtj5XcyOebajltCI6fCJ40gADB8JLSyY1icKOMK+u4=
Output for 5.0.0 - 5.4.32, 5.5.35, 5.6.21 - 5.6.28
801a0b4c58e90c84dc40475c3a44764d 801a0b4c58e90c84dc40475c3a44764d Fatal error: Call to undefined function mcrypt_get_block_size() in /in/A2BUh on line 25
Process exited with code 255.
Output for 4.4.5 - 4.4.9
801a0b4c58e90c84dc40475c3a44764d Warning: Wrong parameter count for md5() in /in/A2BUh on line 16 801a0b4c58e90c84dc40475c3a44764d Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/A2BUh on line 25
Process exited with code 255.
Output for 4.3.2 - 4.4.4
801a0b4c58e90c84dc40475c3a44764d Warning: Wrong parameter count for md5() in /in/A2BUh on line 16 801a0b4c58e90c84dc40475c3a44764d Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/A2BUh on line 25
Process exited with code 255.
Output for 4.3.0 - 4.3.1
801a0b4c58e90c84dc40475c3a44764d Warning: Wrong parameter count for md5() in /in/A2BUh on line 16 801a0b4c58e90c84dc40475c3a44764d Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/A2BUh on line 25