3v4l.org

run code in 300+ PHP versions simultaneously
<?php $encryption_key="adfgjderuspmwzwt"; $encryptedText = "02eftQAHQKejcfMJYbm06GD21HqFCj55uhAMLqbdGEONSHWLVMn1dIchgEFCNZvCSW7oPM44qyqQ"; $key="adfgjderuspmwzwt"; $data = "02eftQAHQKejcfMJYbm06GD21HqFCj55uhAMLqbdGEONSHWLVMn1dIchgEFCNZvCSW7oPM44qyqQ"; /*$encryptionMethod = "AES-256-CBC"; // DEFINE our cipher define('AES_256_CBC', 'aes-256-cbc'); // Generate a 256-bit encryption key // This should be stored somewhere instead of recreating it each time $encryption_key = openssl_random_pseudo_bytes(32); $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($encryptionMethod)); $encrypted = $encryptedText . ':' . $iv; $parts = explode(':', $encrypted); $decrypted = openssl_decrypt($parts[0], $encryptionMethod, $encryption_key, 0, $parts[1]); echo "Decrypted: $decrypted\n";*/ /*function decrypt($data, $key) { $decode = base64_decode($data); return mcrypt_decrypt(MCRYPT_RIJNDAEL_128,$key,$decode,"MCRYPT_MODE_CBC","\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); } decrypt($data, $key);*/ print("-- Start --<br />"); include("AES.class.php"); $z = $_POST['adfgjderuspmwzwt']; $data = $_POST['plaintext']; $mode = $_POST['CBC']; $iv = $_POST['1234567890abcdef']; $aes = new AES($z, $mode, $iv); $starte = microtime(true); $encrypted = $aes->encrypt($data); $ende = microtime(true); print "Execution time to encrypt: " . ($ende - $starte) . " seconds<br />"; print "Cipher-Text: " . $encrypted . "<br />"; print "Hex: " . bin2hex($encrypted) . "<br />"; print "Base 64: " . base64_encode($encrypted) . "<br /><br />"; $startd = microtime(true); $decrypted = $aes->decrypt($encryptedText); $endd = microtime(true); print "Execution time to decrypt: " . ($endd - $startd) . " seconds<br />"; print "Decrypted-Text: " . stripslashes($decrypted); print "<br />-- End --<br />";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/9mf0b
function name:  (null)
number of ops:  78
compiled vars:  !0 = $encryption_key, !1 = $encryptedText, !2 = $key, !3 = $data, !4 = $z, !5 = $mode, !6 = $iv, !7 = $aes, !8 = $starte, !9 = $encrypted, !10 = $ende, !11 = $startd, !12 = $decrypted, !13 = $endd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'adfgjderuspmwzwt'
    4     1        ASSIGN                                                   !1, '02eftQAHQKejcfMJYbm06GD21HqFCj55uhAMLqbdGEONSHWLVMn1dIchgEFCNZvCSW7oPM44qyqQ'
    5     2        ASSIGN                                                   !2, 'adfgjderuspmwzwt'
    6     3        ASSIGN                                                   !3, '02eftQAHQKejcfMJYbm06GD21HqFCj55uhAMLqbdGEONSHWLVMn1dIchgEFCNZvCSW7oPM44qyqQ'
   30     4        ECHO                                                     '--+Start+--%3Cbr+%2F%3E'
   31     5        INCLUDE_OR_EVAL                                          'AES.class.php', INCLUDE
   32     6        FETCH_R                      global              ~19     '_POST'
          7        FETCH_DIM_R                                      ~20     ~19, 'adfgjderuspmwzwt'
          8        ASSIGN                                                   !4, ~20
   33     9        FETCH_R                      global              ~22     '_POST'
         10        FETCH_DIM_R                                      ~23     ~22, 'plaintext'
         11        ASSIGN                                                   !3, ~23
   34    12        FETCH_R                      global              ~25     '_POST'
         13        FETCH_DIM_R                                      ~26     ~25, 'CBC'
         14        ASSIGN                                                   !5, ~26
   35    15        FETCH_R                      global              ~28     '_POST'
         16        FETCH_DIM_R                                      ~29     ~28, '1234567890abcdef'
         17        ASSIGN                                                   !6, ~29
   37    18        NEW                                              $31     'AES'
         19        SEND_VAR_EX                                              !4
         20        SEND_VAR_EX                                              !5
         21        SEND_VAR_EX                                              !6
         22        DO_FCALL                                      0          
         23        ASSIGN                                                   !7, $31
   38    24        INIT_FCALL                                               'microtime'
         25        SEND_VAL                                                 <true>
         26        DO_ICALL                                         $34     
         27        ASSIGN                                                   !8, $34
   39    28        INIT_METHOD_CALL                                         !7, 'encrypt'
         29        SEND_VAR_EX                                              !3
         30        DO_FCALL                                      0  $36     
         31        ASSIGN                                                   !9, $36
   40    32        INIT_FCALL                                               'microtime'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $38     
         35        ASSIGN                                                   !10, $38
   41    36        SUB                                              ~40     !10, !8
         37        CONCAT                                           ~41     'Execution+time+to+encrypt%3A+', ~40
         38        CONCAT                                           ~42     ~41, '+seconds%3Cbr+%2F%3E'
         39        ECHO                                                     ~42
   42    40        CONCAT                                           ~43     'Cipher-Text%3A+', !9
         41        CONCAT                                           ~44     ~43, '%3Cbr+%2F%3E'
         42        ECHO                                                     ~44
   43    43        INIT_FCALL                                               'bin2hex'
         44        SEND_VAR                                                 !9
         45        DO_ICALL                                         $45     
         46        CONCAT                                           ~46     'Hex%3A+', $45
         47        CONCAT                                           ~47     ~46, '%3Cbr+%2F%3E'
         48        ECHO                                                     ~47
   44    49        INIT_FCALL                                               'base64_encode'
         50        SEND_VAR                                                 !9
         51        DO_ICALL                                         $48     
         52        CONCAT                                           ~49     'Base+64%3A+', $48
         53        CONCAT                                           ~50     ~49, '%3Cbr+%2F%3E%3Cbr+%2F%3E'
         54        ECHO                                                     ~50
   45    55        INIT_FCALL                                               'microtime'
         56        SEND_VAL                                                 <true>
         57        DO_ICALL                                         $51     
         58        ASSIGN                                                   !11, $51
   46    59        INIT_METHOD_CALL                                         !7, 'decrypt'
         60        SEND_VAR_EX                                              !1
         61        DO_FCALL                                      0  $53     
         62        ASSIGN                                                   !12, $53
   47    63        INIT_FCALL                                               'microtime'
         64        SEND_VAL                                                 <true>
         65        DO_ICALL                                         $55     
         66        ASSIGN                                                   !13, $55
   48    67        SUB                                              ~57     !13, !11
         68        CONCAT                                           ~58     'Execution+time+to+decrypt%3A+', ~57
         69        CONCAT                                           ~59     ~58, '+seconds%3Cbr+%2F%3E'
         70        ECHO                                                     ~59
   49    71        INIT_FCALL                                               'stripslashes'
         72        SEND_VAR                                                 !12
         73        DO_ICALL                                         $60     
         74        CONCAT                                           ~61     'Decrypted-Text%3A+', $60
         75        ECHO                                                     ~61
   50    76        ECHO                                                     '%3Cbr+%2F%3E--+End+--%3Cbr+%2F%3E'
         77      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.11 ms | 1400 KiB | 21 Q