Skip to content

Instantly share code, notes, and snippets.

@ooooak
Created September 14, 2015 05:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ooooak/ad8ec6c71adeae943a74 to your computer and use it in GitHub Desktop.
Save ooooak/ad8ec6c71adeae943a74 to your computer and use it in GitHub Desktop.
laravel bcrypt function
<?php
function bcrypt($password)
{
$hash = password_hash($password, PASSWORD_BCRYPT, ['cost' => 10]);
if ($hash === false)
{
throw new RuntimeException('Bcrypt hashing not supported.');
}
return $hash;
}
@nakagawadev
Copy link

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment