First, MD5 and SHA are in the java.security.* package!
And about decrypting MD5's -- MD5 is a one way function so you can not
decrypt it or reverse it. To compare the password. Encode the password
and compare with the prestored digest.
What is an one way function?
Well, if I take 531 then generate a digest 5 + 3 + 1, I will get 9.
However, from 9 I can not tell what were the numbers used to generate
it. Or how many numbers were there. MD5 is similar. It generates a 16
byte digest (number) for any set of bytes. The only difference is that
it is pretty unique unlike my example where 5+1+1+2 would also have
generated 9.
Hope that helps!
Ashish
http://headlines.sourceforge.net
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets