File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Digest in java

 
Bharat Khillari
Greenhorn
Posts: 7
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For converting byte array to String try using new String(byte[]) and not toString() method. Hope it works.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic