diff options
Diffstat (limited to 'phpBB/phpbb/passwords/driver/bcrypt.php')
-rw-r--r-- | phpBB/phpbb/passwords/driver/bcrypt.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/phpBB/phpbb/passwords/driver/bcrypt.php b/phpBB/phpbb/passwords/driver/bcrypt.php index 1d1b1e267d..eab1c3d569 100644 --- a/phpBB/phpbb/passwords/driver/bcrypt.php +++ b/phpBB/phpbb/passwords/driver/bcrypt.php @@ -1,23 +1,24 @@ <?php /** * -* @package phpBB3 -* @copyright (c) 2013 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ namespace phpbb\passwords\driver; -/** -* @package passwords -*/ class bcrypt extends base { const PREFIX = '$2a$'; /** - * @inheritdoc + * {@inheritdoc} */ public function get_prefix() { @@ -25,7 +26,7 @@ class bcrypt extends base } /** - * @inheritdoc + * {@inheritdoc} */ public function hash($password, $salt = '') { @@ -57,9 +58,9 @@ class bcrypt extends base } /** - * @inheritdoc + * {@inheritdoc} */ - public function check($password, $hash) + public function check($password, $hash, $user_row = array()) { $salt = substr($hash, 0, 29); if (strlen($salt) != 29) @@ -67,7 +68,7 @@ class bcrypt extends base return false; } - if ($hash == $this->hash($password, $salt)) + if ($this->helper->string_compare($hash, $this->hash($password, $salt))) { return true; } @@ -85,7 +86,7 @@ class bcrypt extends base } /** - * @inheritdoc + * {@inheritdoc} */ public function get_settings_only($hash, $full = false) { |