This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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' .