1.2.40. Argon2 Usage¶
Argon2 is an optionally compiled password hashing API.
Argon2 has been added to the password hashing API in PHP 7.2.
It is not available in older version. It also requires PHP to be compiled with the –with-password-argon2 option.
<?php
// Hashing a password with argon2
$hash = password_hash('password', PASSWORD_ARGON2I, ['memory_cost' => 1<<17,
'time_cost' => PASSWORD_ARGON2_DEFAULT_TIME_COST,
'threads' => PASSWORD_ARGON2_DEFAULT_THREADS]);
?>
See also Argon2 Password Hash.
1.2.40.1. Connex PHP features¶
1.2.40.1.1. Specs¶
Short name |
Php/Argon2Usage |
Rulesets |
|
Exakat since |
1.0.4 |
PHP Version |
All |
Severity |
Minor |
Time To Fix |
Slow (1 hour) |
Precision |
Very high |
Available in |