jrodri2001
10-01-2009, 04:00 PM
Hi,
I have a working PHP function that decrypts the following data as follows:
// $data = "¯WEÑ3àWS";
//$iv = "fa09edcb";
//$key = "ed75380662ee77f81655c150";
function pDecStrong($data,$key,$iv)
{
$td = mcrypt_module_open(MCRYPT_3DES, '', 'cbc', '');
mcrypt_generic_init($td, $key, $iv);
$data = mdecrypt_generic($td, $data);
mcrypt_module_close($td);
return $data;
}
this function should return "ALXPK" for the given parameters. I am trying to reproduce this in java but I haven't been able to get the same result.
Any Ideas?
I have a working PHP function that decrypts the following data as follows:
// $data = "¯WEÑ3àWS";
//$iv = "fa09edcb";
//$key = "ed75380662ee77f81655c150";
function pDecStrong($data,$key,$iv)
{
$td = mcrypt_module_open(MCRYPT_3DES, '', 'cbc', '');
mcrypt_generic_init($td, $key, $iv);
$data = mdecrypt_generic($td, $data);
mcrypt_module_close($td);
return $data;
}
this function should return "ALXPK" for the given parameters. I am trying to reproduce this in java but I haven't been able to get the same result.
Any Ideas?