This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Java in General and the fly likes Digest in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Digest in java" Watch "Digest in java" New topic

Digest in java

Bharat Khillari

Joined: Jun 29, 2001
Posts: 7
Please can naybody help me out...
I have one script called digest on linux when i am passing input "bharat" to it it's giving me output : "37V7Ll82wfiT28Et1miX1A==".
When i am passing that same string to my java digest class it's giving me output: "[B@3ac748".
Since i have to store that encrypted password in ldap for further authetication what is the proper way for digest please help me out?
Why the results are different?
Bharat A. Khillari
David Bejjam

Joined: Aug 16, 2001
Posts: 17
For converting byte array to String try using new String(byte[]) and not toString() method. Hope it works.
I agree. Here's the link:
subject: Digest in java
Similar Threads
Digest in java
Digest in java
recall applet on page refresh
Login Name & Password Verification
Websphere MQ Tutorial