Originally posted by Shailesh Pillai:
I want to encrypt the passwords that i am storing in my database. How can I achieve this?
Does anyone have the code or can anyone suggest any URL where I can get MD5 algorithm to encrypt passwords that I am storing in my database.
The Tomcat code for RealmBase is a good reference.
It's main() is a good starting point to see how you can get an encrypted password.
And it's authenticate(String username, String credentials) is a good starting point to see how you can do the matching.
At http://www.jonh.net/~jonh/md5/MD5.java you will get a working implementation in java.
[ February 13, 2007: Message edited by: Kaustabh Singha Roy ]