Skip to content

Instantly share code, notes, and snippets.

@YurePereira
Created November 5, 2017 17:33
Show Gist options
  • Select an option

  • Save YurePereira/ee8178b0905ed17b52c07e6c1916b986 to your computer and use it in GitHub Desktop.

Select an option

Save YurePereira/ee8178b0905ed17b52c07e6c1916b986 to your computer and use it in GitHub Desktop.
Creating a password hash with the password_hash function changing the default cost in PHP
<?php
$password = 'myPassword';
$options = [
'cost' => 13,
];
echo password_hash($password, PASSWORD_DEFAULT, $options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment