Entry
how do i compare and check the user input password from form with encrypted one in the Apache htaccess password file
Jul 19th, 2004 23:22
Alder Rus, Matt Gregory, Nikhil Mehta, http://www.directoryonclick.com , http://www.singapore-yellow-pages.com
The .htpasswd file containes users in a linear list as shown below
<username>:<encrypted-password><cr> where <cr> is carriage return.
In order to compare the encrypted-password to your user-entered
information you must first encrypt the password using the mcrypt
function.
Remember that you cannot decrypt the encrypted information in
the .htpassword file. (at least not easily :) )