*
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
Marshal

Joined: Mar 22, 2005
Posts: 41603
    
  55
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to decript field which is encripted by MD5