MyPage is a personalized page based on your interests.The page is customized to help you to find content that matters you the most.


I'm not curious

3DES in PHP is not same as Java

0
Started on: 24 December 12

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 fromhttp://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 />';


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 fromhttp://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).'
';

Related Posts:

Initiator

Pawan Pandey
Pawan Pandey
  Follow

Give me a computer and leave me alone ... I will be happiest person in this world :)

Please to reply this post
Important:
  • We hope the conversations that take place on MyTechLogy.com will be constructive and thought-provoking.
  • To ensure the quality of the discussion, our moderators may review/edit the comments for clarity and relevance.
  • Comments that are promotional, mean-spirited, or off-topic may be deleted per the moderators' judgment.
Awards & Accolades for MyTechLogy
Winner of
REDHERRING
Top 100 Asia
Finalist at SiTF Awards 2014 under the category Best Social & Community Product
Finalist at HR Vendor of the Year 2015 Awards under the category Best Learning Management System
Finalist at HR Vendor of the Year 2015 Awards under the category Best Talent Management Software
Hidden Image Url

Back to Top