3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tempToken = "cecf180d-800e-43ee-82b5-2b22db814d9098b3bf2a-b5bd-4800-ac75-3e29d72b6155"; $clearText = "AuthToken=cecf180d-800e-43ee-82b5-2b22db814d9098b3bf2a-b5bd-4800-ac75-3e29d72b6155&PayerId=9979571404994689&PaymentProcessType=CreditCard&ProcessMethod=None&PaymentMethodStorageOption=None&ReturnURL=https://il01addproc.propay.com:443/Return.aspx "; // 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); // 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("M", $pad); echo $encodedNameValueString; // 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); // Use Base64 encoding to send the resulting bytes of the encrypted name value string $settingsCipher = base64_encode($aes128); echo $settingsCipher;
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Function utf8_encode() is deprecated in /in/WKW1O on line 7 Deprecated: Function utf8_encode() is deprecated in /in/WKW1O on line 13 Fatal error: Uncaught Error: Call to undefined function mcrypt_get_block_size() in /in/WKW1O:16 Stack trace: #0 {main} thrown in /in/WKW1O on line 16
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
33.28 ms | 401 KiB | 8 Q