mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
Merge pull request #5566 from JoshyPHP/ticket/16017
[ticket/16017] Add support for Argon2id as default password hashing
This commit is contained in:
@@ -14,6 +14,7 @@ parameters:
|
||||
|
||||
# List of default password driver types
|
||||
passwords.algorithms:
|
||||
- passwords.driver.argon2id
|
||||
- passwords.driver.argon2i
|
||||
- passwords.driver.bcrypt_2y
|
||||
- passwords.driver.bcrypt
|
||||
|
@@ -41,6 +41,12 @@ services:
|
||||
tags:
|
||||
- { name: passwords.driver }
|
||||
|
||||
passwords.driver.argon2id:
|
||||
class: phpbb\passwords\driver\argon2id
|
||||
parent: passwords.driver.argon2i
|
||||
tags:
|
||||
- { name: passwords.driver }
|
||||
|
||||
passwords.driver.bcrypt:
|
||||
class: phpbb\passwords\driver\bcrypt
|
||||
arguments:
|
||||
|
33
phpBB/phpbb/passwords/driver/argon2id.php
Normal file
33
phpBB/phpbb/passwords/driver/argon2id.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* 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;
|
||||
|
||||
class argon2id extends argon2i
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_algo_name()
|
||||
{
|
||||
return 'PASSWORD_ARGON2ID';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_prefix()
|
||||
{
|
||||
return '$argon2id$';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user