Last active
September 15, 2020 00:57
-
-
Save lesstif/7fd5b95b023ce61eefb835eb4585526e to your computer and use it in GitHub Desktop.
argon2 php example code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$password = 'secret'; | |
$options = [ | |
'memory_cost' => 1<<17, // 128 Mb | |
'time_cost' => 4, // time_cost | |
'threads' => 2, // parallel thread | |
]; | |
$hash = password_hash($password, PASSWORD_ARGON2ID, $options); | |
var_dump($hash); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment