I know that php has md5(), sha1(), and the hash() functions, but I want to create a hash using the MySQL PASSWORD() function. So far, the only way I can think of is to just
Yes, too late but I just came up this implementation on that page: http://dev.mysql.com/doc/refman/5.1/en/password-hashing.html
Here is the equivalent php function to mysql password;
function mysql_41_password($in) { $p = sha1($in, true); $p = sha1($p); return '*'. strtoupper($p); }