<?php
/*
* PHP mcrypt - Basic encryption and decryption of a string
*/
$string = "Some text to be encrypted";
$secret_key = "15874873782";
$encrypted_string = "Jg7GpP1uxf+qTBEzBQTu5Q==";
// Create the initialization vector for added security.
// $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
// Encrypt $string
//$encrypted_string = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $secret_key, $string, MCRYPT_MODE_CBC, $iv);
// Decrypt $string
$decrypted_string = mdecrypt_generic($secret_key, $encrypted_string);
echo "Original string : " . $string . "<br />\n";
//echo "Encrypted string : " . $encrypted_string . "<br />\n";
echo "Decrypted string : " . $decrypted_string . "<br />\n";
?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename: /in/h0J0O
function name: (null)
number of ops: 15
compiled vars: !0 = $string, !1 = $secret_key, !2 = $encrypted_string, !3 = $decrypted_string
line #* E I O op fetch ext return operands
-------------------------------------------------------------------------------------
5 0 E > ASSIGN !0, 'Some+text+to+be+encrypted'
6 1 ASSIGN !1, '15874873782'
7 2 ASSIGN !2, 'Jg7GpP1uxf%2BqTBEzBQTu5Q%3D%3D'
16 3 INIT_FCALL_BY_NAME 'mdecrypt_generic'
4 SEND_VAR_EX !1
5 SEND_VAR_EX !2
6 DO_FCALL 0 $7
7 ASSIGN !3, $7
18 8 CONCAT ~9 'Original+string+%3A+', !0
9 CONCAT ~10 ~9, '%3Cbr+%2F%3E%0A'
10 ECHO ~10
20 11 CONCAT ~11 'Decrypted+string+%3A+', !3
12 CONCAT ~12 ~11, '%3Cbr+%2F%3E%0A'
13 ECHO ~12
21 14 > RETURN 1
Generated using Vulcan Logic Dumper, using php 8.0.0
preferences:
162.37 ms | 1393 KiB | 13 Q