Skip to content

Commit 9f7171f

Browse files
authored
Merge pull request #526 from kenjis/fix-Config-Auth-password-hashing
config: update ARGON2I/ARGON2ID Algorithm options
2 parents 94a277a + 5483eca commit 9f7171f

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

src/Config/Auth.php

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -278,41 +278,34 @@ class Auth extends BaseConfig
278278

279279
/**
280280
* --------------------------------------------------------------------
281-
* Encryption Algorithm to use
281+
* Hashing Algorithm to use
282282
* --------------------------------------------------------------------
283283
* Valid values are
284284
* - PASSWORD_DEFAULT (default)
285285
* - PASSWORD_BCRYPT
286286
* - PASSWORD_ARGON2I - As of PHP 7.2 only if compiled with support for it
287287
* - PASSWORD_ARGON2ID - As of PHP 7.3 only if compiled with support for it
288-
*
289-
* If you choose to use any ARGON algorithm, then you might want to
290-
* uncomment the "ARGON2i/D Algorithm" options to suit your needs
291288
*/
292289
public string $hashAlgorithm = PASSWORD_DEFAULT;
293290

294291
/**
295292
* --------------------------------------------------------------------
296-
* ARGON2i/D Algorithm options
293+
* ARGON2I/ARGON2ID Algorithm options
297294
* --------------------------------------------------------------------
298-
* The ARGON2I method of encryption allows you to define the "memory_cost",
295+
* The ARGON2I method of hashing allows you to define the "memory_cost",
299296
* the "time_cost" and the number of "threads", whenever a password hash is
300297
* created.
301-
* This defaults to a value of 10 which is an acceptable number.
302-
* However, depending on the security needs of your application
303-
* and the power of your hardware, you might want to increase the
304-
* cost. This makes the hashing process takes longer.
305298
*/
306-
public int $hashMemoryCost = 2048; // PASSWORD_ARGON2_DEFAULT_MEMORY_COST;
299+
public int $hashMemoryCost = 65536; // PASSWORD_ARGON2_DEFAULT_MEMORY_COST;
307300

308-
public int $hashTimeCost = 4; // PASSWORD_ARGON2_DEFAULT_TIME_COST;
309-
public int $hashThreads = 4; // PASSWORD_ARGON2_DEFAULT_THREADS;
301+
public int $hashTimeCost = 4; // PASSWORD_ARGON2_DEFAULT_TIME_COST;
302+
public int $hashThreads = 1; // PASSWORD_ARGON2_DEFAULT_THREADS;
310303

311304
/**
312305
* --------------------------------------------------------------------
313-
* Password Hashing Cost
306+
* BCRYPT Algorithm options
314307
* --------------------------------------------------------------------
315-
* The BCRYPT method of encryption allows you to define the "cost"
308+
* The BCRYPT method of hashing allows you to define the "cost"
316309
* or number of iterations made, whenever a password hash is created.
317310
* This defaults to a value of 10 which is an acceptable number.
318311
* However, depending on the security needs of your application

0 commit comments

Comments
 (0)