1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-19 07:08:09 +01:00

[feature/passwords] Add support for passwords driver service name in hash()

This will allow users to specify both the hash type by prefix and by its
service name.

PHPBB3-11610
This commit is contained in:
Marc Alexander 2014-02-02 14:11:32 +01:00
parent 292961a277
commit 08a8bd8e6f

View File

@ -205,6 +205,13 @@ class manager
return false;
}
// Try to retrieve algorithm by service name if type doesn't
// start with dollar sign
if (!is_array($type) && strpos($type, '$') !== 0 && isset($this->algorithms[$type]))
{
$type = $this->algorithms[$type]->get_prefix();
}
$type = ($type === '') ? $this->type : $type;
if (is_array($type))