3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tempToken = "f7302c99-fc28-47cb-99b5-1c7f13e5679729b57f0b-92c8-41af-a1d8-bd7b7d5c0217"; $clearText = "AuthToken=f7302c99-fc28-47cb-99b5-1c7f13e5679729b57f0b-92c8-41af-a1d8-bd7b7d5c0217&PayerId=3229001738183436&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"; // 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 strlen($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("X", $pad); echo strlen($encodedNameValueString) . "\n"; echo $encodedNameValueString; echo "\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 $aes128; echo "\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
256 Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /in/e8H5o:24 Stack trace: #0 {main} thrown in /in/e8H5o on line 24
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
256 272 AuthToken=f7302c99-fc28-47cb-99b5-1c7f13e5679729b57f0b-92c8-41af-a1d8-bd7b7d5c0217&PayerId=3229001738183436&PaymentProcessType=CreditCard&ProcessMethod=None&PaymentMethodStorageOption=None&ReturnURL=https://il01addproc.propay.com:443/Return.aspx XXXXXXXXXXXXXXXX Nx�Z�`n ����鷲4b���lEՁh΂�F�y7g#��(~=�e�Ԣ?.菰q\�A��Gt�w�.W/��� ��д�\RqLr� �R��q�@فz�� Tl��T�����ݓ�H�L���]M�3���� n��;nj�m�S��f����|���� Ea�p���c��Z{���ioe�!2$��Z���R�(��K��$W� S�~��IB����`)��I�� ~�-���"ϯV�.>��v�H#{g���oM� z TnirCFrtYG4JmIz1w+m3sjQXYr3jwh9sRdWBaM6C90YPlXk3ZyORjSh+Pe0dZbvUoj8u6I+wcVzTwUHNFf4PR3SwdxWjLlcvl9nfAwsNIL3k0LQFlVxScUxyiAnxUtIDqBxxCJtA2YF6ohrlClRssvRU5uvlE/jf3ZOpSAaQTPWCgV1N8zOQk6kW0g1uns4CO25q7W0Q91PDxn9m+MCq8YEEfLqNrY4KRWHKcM4UgfpjEMPrWnv88Nhpb2XAITIksrdaihTG3lIS8yj0vZnhSxSJ5iRXgA1TqH71/UlC7q7yEsvOYCmv5LtJ88QJfuMtyOrT/BYiCM+vVq0uPouadp8PSCN7Z73lvRDmb03mDXo=
Output for 5.0.0 - 5.4.32, 5.5.35, 5.6.21
256 Fatal error: Call to undefined function mcrypt_get_block_size() in /in/e8H5o on line 24
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: Wrong parameter count for md5() in /in/e8H5o on line 16 256 Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/e8H5o on line 24
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Warning: Wrong parameter count for md5() in /in/e8H5o on line 16 256 Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/e8H5o on line 24
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Wrong parameter count for md5() in /in/e8H5o on line 16 256 Fatal error: Call to undefined function: mcrypt_get_block_size() in /in/e8H5o on line 24