3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decryptSerial($encrypted_txt){ $secret_key = "t-3zafRa4"; $secret_iv = "St@cE4eZ4"; $encrypt_method = 'AES-256-CBC'; $key = hash('sha256', $secret_key); $iv = substr(hash('sha256', $secret_iv), 0, 16); return openssl_decrypt(base64_decode($encrypted_txt), $encrypt_method, $key, 0, $iv); } $plaintext = "MXeaSFSUj4az"; $encrypted = encryptSerial($plaintext); echo "Encrypted: $encrypted\n"; $decrypted = decryptSerial($encrypted); echo "Decrypted: $decrypted\n"; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3MZQL
function name:  (null)
number of ops:  18
compiled vars:  !0 = $plaintext, !1 = $encrypted, !2 = $decrypted
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   ASSIGN                                                   !0, 'MXeaSFSUj4az'
   15     1        INIT_FCALL_BY_NAME                                       'encryptSerial'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
   16     5        ROPE_INIT                                     3  ~7      'Encrypted%3A+'
          6        ROPE_ADD                                      1  ~7      ~7, !1
          7        ROPE_END                                      2  ~6      ~7, '%0A'
          8        ECHO                                                     ~6
   18     9        INIT_FCALL                                               'decryptserial'
         10        SEND_VAR                                                 !1
         11        DO_FCALL                                      0  $9      
         12        ASSIGN                                                   !2, $9
   19    13        ROPE_INIT                                     3  ~12     'Decrypted%3A+'
         14        ROPE_ADD                                      1  ~12     ~12, !2
         15        ROPE_END                                      2  ~11     ~12, '%0A'
         16        ECHO                                                     ~11
   21    17      > RETURN                                                   1

Function decryptserial:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3MZQL
function name:  decryptSerial
number of ops:  31
compiled vars:  !0 = $encrypted_txt, !1 = $secret_key, !2 = $secret_iv, !3 = $encrypt_method, !4 = $key, !5 = $iv
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, 't-3zafRa4'
    5     2        ASSIGN                                                   !2, 'St%40cE4eZ4'
    6     3        ASSIGN                                                   !3, 'AES-256-CBC'
    8     4        INIT_FCALL                                               'hash'
          5        SEND_VAL                                                 'sha256'
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $9      
          8        ASSIGN                                                   !4, $9
    9     9        INIT_FCALL                                               'substr'
         10        INIT_FCALL                                               'hash'
         11        SEND_VAL                                                 'sha256'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                         $11     
         14        SEND_VAR                                                 $11
         15        SEND_VAL                                                 0
         16        SEND_VAL                                                 16
         17        DO_ICALL                                         $12     
         18        ASSIGN                                                   !5, $12
   11    19        INIT_FCALL_BY_NAME                                       'openssl_decrypt'
         20        INIT_FCALL                                               'base64_decode'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $14     
         23        SEND_VAR_NO_REF_EX                                       $14
         24        SEND_VAR_EX                                              !3
         25        SEND_VAR_EX                                              !4
         26        SEND_VAL_EX                                              0
         27        SEND_VAR_EX                                              !5
         28        DO_FCALL                                      0  $15     
         29      > RETURN                                                   $15
   12    30*     > RETURN                                                   null

End of function decryptserial

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.2 ms | 1015 KiB | 17 Q