Skip to content

Instantly share code, notes, and snippets.

@ketominer
Created April 10, 2019 11:32
Show Gist options
  • Save ketominer/2f34a1e56b171a7ee14381d87557c1db to your computer and use it in GitHub Desktop.
Save ketominer/2f34a1e56b171a7ee14381d87557c1db to your computer and use it in GitHub Desktop.
<?php
$options = [
'memory_cost' => 1<<17, // 128 Mb
'time_cost' => 4,
'threads' => 2,
];
$test_hash = password_hash('foobar', PASSWORD_ARGON2I, $options);
if(!password_verify('foobar', $test_hash)) {
echo("ARGON2I seems to not be working properly...\n");
} else {
echo("ARGON2I is fine so far...\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment