mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-15 06:06:32 +02:00
[feature/passwords] Add function for obtaining only the hash to helper
This is also needed for combined hashing of passwords. PHPBB3-11610
This commit is contained in:
@ -145,4 +145,15 @@ class phpbb_crypto_helper
|
|||||||
$rebuilt_hash .= $settings;
|
$rebuilt_hash .= $settings;
|
||||||
return $rebuilt_hash;
|
return $rebuilt_hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtain only the actual hash after the prefixes
|
||||||
|
*
|
||||||
|
* @param string $hash The full password hash
|
||||||
|
* @return string Actual hash (incl. settings)
|
||||||
|
*/
|
||||||
|
protected function obtain_hash_only($hash)
|
||||||
|
{
|
||||||
|
return substr($hash, strripos($hash, '$') + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user