Hello guys, can someone help me in writing a following function?
a function that will implement a password validation routine. The function will accept the username, plaintext password, an MD5 Hash to validate and an optional array
The MD5 hash should contain the password with the key appended to it, if a key was passed to the function.
if the login is successful the function should return boolean true, if the login is unsuccessfull, the function should log the failed attampt to a file in /var/tmp/login_failures using the usernames and a timestamp. The function should then return Boolean false. Note that this function will exist on a web server and could have many concurrent hits to this function.
The function should implement the folloing function prototype.
function checkPassword($usernam,$password,$hash,$key=NULL);
Thanks in Advance