[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:
Marc Alexander 2013-06-27 14:27:11 +02:00
parent 16e5d0dc35
commit c67f7dba60

View file

@ -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);
}
} }