K
Kelvin
Dear all,
I don't know how to write a asp/vb/c# program to decrypt PHP encrypted code.
Here is attched my code in PHP
$key = "ab";
$random_number = kelvin;
$encrypted=encrypt($key,$random_number);
$decrypted=decrypt($key,$encrypted);
echo "NUMBER: $random_number<br>
ENCRYPTED VALUE: $encrypted<br>
DECRYPTED VALUE: $decrypted";
/* Your functions without the comments are below */
function encrypt($key, $plain_text) {
$plain_text = trim($plain_text);
$iv = substr(md5($key), 0,mcrypt_get_iv_size (MCRYPT_CAST_256,MCRYPT_MODE_CFB));
$c_t = mcrypt_cfb (MCRYPT_CAST_256, $key, $plain_text, MCRYPT_ENCRYPT, $iv);
return trim(chop(base64_encode($c_t)));
}
Thanks
I don't know how to write a asp/vb/c# program to decrypt PHP encrypted code.
Here is attched my code in PHP
$key = "ab";
$random_number = kelvin;
$encrypted=encrypt($key,$random_number);
$decrypted=decrypt($key,$encrypted);
echo "NUMBER: $random_number<br>
ENCRYPTED VALUE: $encrypted<br>
DECRYPTED VALUE: $decrypted";
/* Your functions without the comments are below */
function encrypt($key, $plain_text) {
$plain_text = trim($plain_text);
$iv = substr(md5($key), 0,mcrypt_get_iv_size (MCRYPT_CAST_256,MCRYPT_MODE_CFB));
$c_t = mcrypt_cfb (MCRYPT_CAST_256, $key, $plain_text, MCRYPT_ENCRYPT, $iv);
return trim(chop(base64_encode($c_t)));
}
Thanks