I have a 3DES encrypted string from a service on java as -
30BA1A87B3B08F8A6F69BF0E2EC7539B
when i am applying 3DES encryption in PHP to check the result, i am getting a very different string which is as -
ªã;Îù1ù@yq—ÿÃÓ"Õó[ûñüM“ƒº5fá$!Ø5JºÝ7
i am using an open source PHP lib for encryption, which is Crypt_TripleDES from http://sourceforge.net/projects/phpseclib/.
Can someone help me, to understand what is wrong and where?
Please ask if I am missing anything.
Thanks
PHP Code -
require_once 'Crypt/TripleDES.php';
$tdes = new Crypt_TripleDES();
$tdes->setKey($key);
$enc_text = $tdes->encrypt($text);
echo 'Encrypted text - '.($enc_text).'<br />';