Apply Argon2 options for Argon2id hashing as well

Signed-off-by: MichaIng <micha@dietpi.com>
This commit is contained in:
MichaIng 2020-05-01 11:42:13 +02:00 committed by GitHub
parent c724eb24d5
commit 229570badf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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