3v4l.org

run code in 500+ PHP versions simultaneously
<?php // Secret for encryption from PAY.ON webhook configuration $encryptionKey = "2AAF35485A2BBB9196CE58DE0C88E2D3C7735A43A609A5ED9C868D17EFB8D67D"; // Headers received from webhook $ivHex = "1EDC4E012C572E7DE66EE839"; $authTagHex = "FC35831EDF2EE0C25AC2A10240CA8B97"; // Encrypted body received from webhook.site $cipherTextHex = 'PASTE_THE_COMPLETE_ENCRYPTED_BODY_HERE'; // Convert HEX values to binary $key = hex2bin($encryptionKey); $iv = hex2bin($ivHex); $authTag = hex2bin($authTagHex); $cipherText = hex2bin($cipherTextHex); // Decrypt $result = openssl_decrypt( $cipherText, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv, $authTag ); // Output result if ($result === false) { echo "Decryption failed"; echo PHP_EOL; echo openssl_error_string(); } else { echo "Decrypted Payload:"; echo PHP_EOL; echo $result; } ?><?php // Secret for encryption from PAY.ON webhook configuration $encryptionKey = "2AAF35485A2BBB9196CE58DE0C88E2D3C7735A43A609A5ED9C868D17EFB8D67D"; // Headers received from webhook $ivHex = "1EDC4E012C572E7DE66EE839"; $authTagHex = "FC35831EDF2EE0C25AC2A10240CA8B97"; // Encrypted body received from webhook.site $cipherTextHex = 'PASTE_THE_COMPLETE_ENCRYPTED_BODY_HERE'; // Convert HEX values to binary $key = hex2bin($encryptionKey); $iv = hex2bin($ivHex); $authTag = hex2bin($authTagHex); $cipherText = hex2bin($cipherTextHex); // Decrypt $result = openssl_decrypt( $cipherText, 'aes-256-gcm', $key, OPENSSL_RAW_DATA, $iv, $authTag ); // Output result if ($result === false) { echo "Decryption failed"; echo PHP_EOL; echo openssl_error_string(); } else { echo "Decrypted Payload:"; echo PHP_EOL; echo $result; } ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 38
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 41
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 73, Position 2 = 79
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 82
Branch analysis from position: 82
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 79
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 73, Position 2 = 79
Branch analysis from position: 73
Branch analysis from position: 79
filename:       /in/ikTtT
function name:  (null)
number of ops:  83
compiled vars:  !0 = $encryptionKey, !1 = $ivHex, !2 = $authTagHex, !3 = $cipherTextHex, !4 = $key, !5 = $iv, !6 = $authTag, !7 = $cipherText, !8 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                       !0, '2AAF35485A2BBB9196CE58DE0C88E2D3C7735A43A609A5ED9C868D17EFB8D67D'
    7     1        ASSIGN                                                       !1, '1EDC4E012C572E7DE66EE839'
    8     2        ASSIGN                                                       !2, 'FC35831EDF2EE0C25AC2A10240CA8B97'
   11     3        ASSIGN                                                       !3, 'PASTE_THE_COMPLETE_ENCRYPTED_BODY_HERE'
   14     4        INIT_FCALL                                                   'hex2bin'
          5        SEND_VAR                                                     !0
          6        DO_ICALL                                             $13     
          7        ASSIGN                                                       !4, $13
   15     8        INIT_FCALL                                                   'hex2bin'
          9        SEND_VAR                                                     !1
         10        DO_ICALL                                             $15     
         11        ASSIGN                                                       !5, $15
   16    12        INIT_FCALL                                                   'hex2bin'
         13        SEND_VAR                                                     !2
         14        DO_ICALL                                             $17     
         15        ASSIGN                                                       !6, $17
   17    16        INIT_FCALL                                                   'hex2bin'
         17        SEND_VAR                                                     !3
         18        DO_ICALL                                             $19     
         19        ASSIGN                                                       !7, $19
   20    20        INIT_FCALL_BY_NAME                                           'openssl_decrypt'
   21    21        SEND_VAR_EX                                                  !7
   22    22        SEND_VAL_EX                                                  'aes-256-gcm'
   21    23        SEND_VAR_EX                                                  !4
   24    24        FETCH_CONSTANT                                       ~21     'OPENSSL_RAW_DATA'
         25        SEND_VAL_EX                                                  ~21
   21    26        SEND_VAR_EX                                                  !5
         27        SEND_VAR_EX                                                  !6
   20    28        DO_FCALL                                          0  $22     
         29        ASSIGN                                                       !8, $22
   30    30        TYPE_CHECK                                        4          !8
         31      > JMPZ                                                         ~24, ->38
   31    32    >   ECHO                                                         'Decryption+failed'
   32    33        ECHO                                                         '%0A'
   33    34        INIT_FCALL_BY_NAME                                           'openssl_error_string'
         35        DO_FCALL                                          0  $25     
         36        ECHO                                                         $25
   30    37      > JMP                                                          ->41
   35    38    >   ECHO                                                         'Decrypted+Payload%3A'
   36    39        ECHO                                                         '%0A'
   37    40        ECHO                                                         !8
   43    41    >   ASSIGN                                                       !0, '2AAF35485A2BBB9196CE58DE0C88E2D3C7735A43A609A5ED9C868D17EFB8D67D'
   46    42        ASSIGN                                                       !1, '1EDC4E012C572E7DE66EE839'
   47    43        ASSIGN                                                       !2, 'FC35831EDF2EE0C25AC2A10240CA8B97'
   50    44        ASSIGN                                                       !3, 'PASTE_THE_COMPLETE_ENCRYPTED_BODY_HERE'
   53    45        INIT_FCALL                                                   'hex2bin'
         46        SEND_VAR                                                     !0
         47        DO_ICALL                                             $30     
         48        ASSIGN                                                       !4, $30
   54    49        INIT_FCALL                                                   'hex2bin'
         50        SEND_VAR                                                     !1
         51        DO_ICALL                                             $32     
         52        ASSIGN                                                       !5, $32
   55    53        INIT_FCALL                                                   'hex2bin'
         54        SEND_VAR                                                     !2
         55        DO_ICALL                                             $34     
         56        ASSIGN                                                       !6, $34
   56    57        INIT_FCALL                                                   'hex2bin'
         58        SEND_VAR                                                     !3
         59        DO_ICALL                                             $36     
         60        ASSIGN                                                       !7, $36
   59    61        INIT_FCALL_BY_NAME                                           'openssl_decrypt'
   60    62        SEND_VAR_EX                                                  !7
   61    63        SEND_VAL_EX                                                  'aes-256-gcm'
   60    64        SEND_VAR_EX                                                  !4
   63    65        FETCH_CONSTANT                                       ~38     'OPENSSL_RAW_DATA'
         66        SEND_VAL_EX                                                  ~38
   60    67        SEND_VAR_EX                                                  !5
         68        SEND_VAR_EX                                                  !6
   59    69        DO_FCALL                                          0  $39     
         70        ASSIGN                                                       !8, $39
   69    71        TYPE_CHECK                                        4          !8
         72      > JMPZ                                                         ~41, ->79
   70    73    >   ECHO                                                         'Decryption+failed'
   71    74        ECHO                                                         '%0A'
   72    75        INIT_FCALL_BY_NAME                                           'openssl_error_string'
         76        DO_FCALL                                          0  $42     
         77        ECHO                                                         $42
   69    78      > JMP                                                          ->82
   74    79    >   ECHO                                                         'Decrypted+Payload%3A'
   75    80        ECHO                                                         '%0A'
   76    81        ECHO                                                         !8
   79    82    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
127.75 ms | 487 KiB | 8 Q