Apply Argon2 options for Argon2id hashing as well
Signed-off-by: MichaIng <micha@dietpi.com>
This commit is contained in:
parent
c724eb24d5
commit
229570badf
|
@ -65,7 +65,7 @@ class Hasher implements IHasher {
|
|||
public function __construct(IConfig $config) {
|
||||
$this->config = $config;
|
||||
|
||||
if (\defined('PASSWORD_ARGON2I')) {
|
||||
if (\defined('PASSWORD_ARGON2ID') || \defined('PASSWORD_ARGON2I')) {
|
||||
// password_hash fails, when the minimum values are undershot.
|
||||
// In this case, apply minimum.
|
||||
$this->options['threads'] = max($this->config->getSystemValueInt('hashingThreads', PASSWORD_ARGON2_DEFAULT_THREADS), 1);
|
||||
|
|
Loading…
Reference in New Issue