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 "; $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); // 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 $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); // Use Base64 encoding to send the resulting bytes of the encrypted name value string $settingsCipher = base64_encode($aes128); echo $settingsCipher;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CaEQm
function name:  (null)
number of ops:  35
compiled vars:  !0 = $tempToken, !1 = $clearText, !2 = $encodedTempToken, !3 = $md5Hash, !4 = $encodedNameValueString, !5 = $aes128, !6 = $settingsCipher
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'cecf180d-800e-43ee-82b5-2b22db814d9098b3bf2a-b5bd-4800-ac75-3e29d72b6155'
    6     1        ASSIGN                                                   !1, 'AuthToken%3Dcecf180d-800e-43ee-82b5-2b22db814d9098b3bf2a-b5bd-4800-ac75-3e29d72b6155%26PayerId%3D9979571404994689%26PaymentProcessType%3DCreditCard%26ProcessMethod%3DNone%26PaymentMethodStorageOption%3DNone%26ReturnURL%3Dhttps%3A%2F%2Fil01addproc.propay.com%3A443%2FReturn.aspx%0B%0B%0B%0B%0B%0B%0B%0B%0B%0B%0B'
    8     2        ASSIGN                                                   !0, '1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5'
    9     3        ASSIGN                                                   !1, 'AuthToken%3D1f25d31c-e8fe-4d68-be73-f7b439bfa0a329e90de6-4e93-4374-8633-22cef77467f5%26PayerID%3D2833955147881261%26Amount%3D10.00%26CurrencyCode%3DUSD%26ProcessMethod%3DCapture%26PaymentMethodStorageOption%3DNone%26InvoiceNumber%3DInvoice123%26Comment1%3Dcomment1%26Comment2%3Dcomment2%26echo%3Dechotest%26ReturnURL%3Dhttps%3A%2F%2Fil01addproc.propay.com%3A443%2FReturn.aspx%26ProfileId%3D3351%26PaymentProcessType%3DCreditCard%26StandardEntryClassCode%3D%26DisplayMessage%3DTrue%26Protected%3DFalse'
   13     4        INIT_FCALL                                               'utf8_encode'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $11     
          7        ASSIGN                                                   !2, $11
   16     8        INIT_FCALL                                               'md5'
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 <true>
         11        DO_ICALL                                         $13     
         12        ASSIGN                                                   !3, $13
   19    13        INIT_FCALL                                               'utf8_encode'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                         $15     
         16        ASSIGN                                                   !4, $15
   26    17        ECHO                                                     !4
   27    18        ECHO                                                     '%0A'
   30    19        INIT_FCALL_BY_NAME                                       'mcrypt_encrypt'
         20        FETCH_CONSTANT                                   ~17     'MCRYPT_RIJNDAEL_128'
         21        SEND_VAL_EX                                              ~17
         22        SEND_VAR_EX                                              !3
         23        SEND_VAR_EX                                              !4
         24        FETCH_CONSTANT                                   ~18     'MCRYPT_MODE_CBC'
         25        SEND_VAL_EX                                              ~18
         26        SEND_VAR_EX                                              !3
         27        DO_FCALL                                      0  $19     
         28        ASSIGN                                                   !5, $19
   33    29        INIT_FCALL                                               'base64_encode'
         30        SEND_VAR                                                 !5
         31        DO_ICALL                                         $21     
         32        ASSIGN                                                   !6, $21
   35    33        ECHO                                                     !6
         34      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.48 ms | 1400 KiB | 19 Q