File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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
Marshal

Joined: Mar 22, 2005
Posts: 41034
    
  43
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.


Ping & DNS - my free Android networking tools app
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to decript field which is encripted by MD5
 
Similar Threads
client server authentication problem........
Www-authenticate
Working on bits in java
authentication problem...
Book Promotion : Hacking Exposed: J2EE and Java