Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8298525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:48:29+00:00 2026-06-08T15:48:29+00:00

I have a 3DES encrypted string from a service on java as – 30BA1A87B3B08F8A6F69BF0E2EC7539B

  • 0

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 />';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T15:48:31+00:00Added an answer on June 8, 2026 at 3:48 pm

    It is most like just how you are displaying the information.

    In your first line, it appears you are outputting the string as hex. That is, each byte of the data is converted into two hexadecimal characters.

    In your second line, it looks like you may just be trying to dump the raw binary to the output. That is, each byte is interpreted as an ASCII character, which makes sense why it looks like hell.

    Can we get more information about your Java output? How did you get it exactly?


    After looking at the library, it seems that yes, it is returning the raw binary string. To convert this to hex, you simply need to call the built-in bin2hex() function:

    require_once 'Crypt/TripleDES.php';
    $tdes = new Crypt_TripleDES();
    $tdes->setKey($key);
    $enc_text = $tdes->encrypt($text);
    echo 'Encrypted text - ' . bin2hex($enc_text) . '<br />';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ciphertext, encrypted in 3DES CBC mode, and I'm having some trouble
I have to encrypt a string in my iPhone app. The encryption scheme is
Every method I write to encode a string in Java using 3DES can't be
I have been given the choice by a client of AES128 or 3DES encryption.
I have a SOAP service I am calling with PHP 5.3.1's builtin SoapClient. The
Have a painfully simple blog Post creator, and I'm trying to check if the
have a nice day. I got problem when trying to create an image from
Have converted devise new session from erb to Haml but doens't work, this is
Have a rather abstract question for you all. I'm looking at getting involved in
We are having difficulty decrypting a string in ColdFusion that was previously encrypted with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.