phpBB

Development Wiki

Difference between revisions of "Function.phpbb check hash"

From phpBB Development Wiki

(Created page with '==phpBB Password Hash Check== phpBB passwords are hashed with phpBB's own custom function! Checking against this hash with a human readable password is quite simple: <php>$hash …')
 
 
(5 intermediate revisions by 4 users not shown)
Line 4: Line 4:
 
<php>$hash = phpbb_hash("password");
 
<php>$hash = phpbb_hash("password");
 
$password = "password";
 
$password = "password";
if (phpbb_check_hash($password, $hash)) {
+
if (phpbb_check_hash($password, $hash))
 +
{
 
echo "it matches";
 
echo "it matches";
 
}
 
}
else {
+
else
 +
{
 
echo "it doesn't match";
 
echo "it doesn't match";
 
}
 
}
Line 19: Line 21:
 
*[[trigger_error]]
 
*[[trigger_error]]
 
*[[user_add]]
 
*[[user_add]]
 +
<br><br>
 +
 +
'''Changelog'''
 +
    * 15020110 - Created page - M0nk3h
 +
  
 
<br><br>
 
<br><br>
 
[[Category:Functions]]
 
[[Category:Functions]]
  
[[ja:User_add]]
+
[[ja:Function.phpbb_check_hash]]

Latest revision as of 06:20, 24 March 2010

phpBB Password Hash Check

phpBB passwords are hashed with phpBB's own custom function! Checking against this hash with a human readable password is quite simple:

$hash phpbb_hash("password");
$password "password";
if (
phpbb_check_hash($password$hash))
{
    echo 
"it matches";
}
else
{
    echo 
"it doesn't match";
}

--M0nk3h 15:02, 02 January 2010 (UTC)

See Also



Changelog

   * 15020110 - Created page - M0nk3h