Page 1 of 1

MD5 Implementation in PHP

Posted: Mon Oct 22, 2007 12:04 am
by anp2416
Hello,
I am developing a website, which has an "index.php" page which has a login associated with a form. In this page, there is a function "Validate" which checks for the blank user name and password. The form action field is associated with "login_chk.php" , so on clicking the login button, the form is posted to "login_chk.php" in which the user name and passwords are checked with the database.

Now I want to know, where should I implement MD5 hashing , so that user name and password travels in encrypted form?

Thank you

Posted: Mon Oct 22, 2007 12:38 am
by Kieran Huggins
Here's a Javascript MD5 (among other hashing algorithms):
http://pajhome.org.uk/crypt/md5/

And on the same site, the challenge/response login system you're looking for:
http://pajhome.org.uk/crypt/md5/auth.html

MD5 Implementation in PHP

Posted: Mon Oct 22, 2007 1:29 am
by anp2416
Hello,
But where should I implement the MD5 hashing - in index.php or in login_chk.php.

Thank you

Posted: Mon Oct 22, 2007 2:33 am
by feyd
md5() is a built-in function. Unless you have an odd configuration it should be available anywhere in PHP.