From: MichaIng Date: Fri, 1 May 2020 09:42:13 +0000 (+0200) Subject: Apply Argon2 options for Argon2id hashing as well X-Git-Tag: v19.0.0beta7~14^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F20767%2Fhead;p=nextcloud-server.git Apply Argon2 options for Argon2id hashing as well Signed-off-by: MichaIng --- diff --git a/lib/private/Security/Hasher.php b/lib/private/Security/Hasher.php index 2ed21e7e427..a51508ba8e9 100644 --- a/lib/private/Security/Hasher.php +++ b/lib/private/Security/Hasher.php @@ -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);