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
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: 158
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: 42950
    
  70
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.
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: 158
Thank you Dittmer & Zandis.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to generate MD5 hash?