This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Security and the fly likes How to decript field which is encripted by MD5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Security
Bookmark "How to decript field which is encripted by MD5" Watch "How to decript field which is encripted by MD5" New topic
Author

How to decript field which is encripted by MD5

kamal dobaria
Greenhorn

Joined: Feb 01, 2006
Posts: 2
Hi,

There is a need to decript a field which is encripted by MD5 function as follows,

MessageDigest md = MessageDigest.getInstance("MD5");
md.update(barray);
byte[] result = md.digest();

Can anyone help me how to decript this field which is encripted by MD5?

-Kam
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
MD5 is not a cipher; it is a hash. One of the differences is that ciphers can be decrypted, while hashes can not - they are a one-way function. So what you are asking is fundamentally impossible.
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
I agree with Ulf.

You can only compare and say it is what is intended to be moved across the wire(purely for authentication purposes). You can not see the original content though.

Why not use a cypher like AES(Rijndael)??


Kishore
SCJP, blog
 
Have you checked out Aspose?
 
subject: How to decript field which is encripted by MD5
 
It's not a secret anymore!