wood burning stoves 2.0*
The moose likes Web Services and the fly likes How to verify if a string value is a plain text or MD5 converted Hex value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "How to verify if a string value is a plain text or MD5 converted Hex value" Watch "How to verify if a string value is a plain text or MD5 converted Hex value" New topic
Author

How to verify if a string value is a plain text or MD5 converted Hex value

Sam Saha
Ranch Hand

Joined: Jan 23, 2010
Posts: 104
Hi. I am very new to web service development world. I am extracting the password from which is md5 encripted hex data. Now I am taking the the password value from the property file. From the property file the password could a plain text or MD5 encripted value. Now after I get the value from perperty file first I have to check if it is a plain text value or md5 encripted hex value. How would I check if a string value is a plain text or md5 encripted hex value. I would really appreciate if someone can give me any idea. Please let me know if I am not clear enough or need any other informations. Thank you very much.
Richard Tookey
Ranch Hand

Joined: Aug 27, 2012
Posts: 1045
    
  10

HEX encoding results in 'plain text' so one cannot for sure determine that a value is the password or the HEX encoded MD5 digest of the password. What one can say is that a HEX encoded MD5 digest will contain exactly 32 characters taken from the set [0-9,A-F,a-f] . I don't know of anybody who uses passwords anywhere near that specification so if an entry does match that specification then I would bet that it is a HEX encoded MD5 digest.

It is relatively simple to write a regular expression to check for an entry meeting the HEX encoded MD5 digest specification.

P.S. MD5 is a 'digest' and not an 'encryption'. It cannot be 'decrypted' .
 
wood burning stoves
 
subject: How to verify if a string value is a plain text or MD5 converted Hex value