Skip to content

Instantly share code, notes, and snippets.

@lesstif
Last active September 15, 2020 00:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lesstif/7fd5b95b023ce61eefb835eb4585526e to your computer and use it in GitHub Desktop.
Save lesstif/7fd5b95b023ce61eefb835eb4585526e to your computer and use it in GitHub Desktop.
argon2 php example code
<?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