aspose file tools*
The moose likes Security and the fly likes How to generate MD5 hash? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "How to generate MD5 hash?" Watch "How to generate MD5 hash?" New topic
Author

How to generate MD5 hash?

M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
Hi,
I am using the following code to generate MD5 hash

Is this correct or not? (Why I am asking like this is because, sites like are showing a different hash)
What is wrong in my code?

Thank you.


R6i
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39544
    
  27
Does that site also use the UTF-32 encoding? MD5 predates Unicode, so that seems unlikely.

Furthermore, the digest is ASCII - no base64 encoding is necessary, so that site most likely doesn't do that.


Ping & DNS - updated with new look and Ping home screen widget
Zandis Murāns
Ranch Hand

Joined: Aug 18, 2009
Posts: 174

ok, I'll just give you sample code, you study it by your own:
M K Rayapudi
Ranch Hand

Joined: Feb 19, 2007
Posts: 157
Thank you Dittmer & Zandis.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to generate MD5 hash?
 
Similar Threads
MD5 Digest Problem in Java
MD5
Java Cryptography Extension giving me different result every time
MD5 Digest Problem in Java
need to generate RSA keys from txt files