Commit a36e2773 authored by Taylor Otwell's avatar Taylor Otwell

rearrange hash class.

parent 1da0f231
......@@ -2,6 +2,18 @@
class Hash {
/**
* Determine if an unhashed value matches a given Bcrypt hash.
*
* @param string $value
* @param string $hash
* @return bool
*/
public static function check($value, $hash)
{
return crypt($value, $hash) === $hash;
}
/**
* Hash a password using the Bcrypt hashing scheme.
*
......@@ -39,16 +51,4 @@ class Hash {
return crypt($value, '$2a$'.$work.'$'.$salt);
}
/**
* Determine if an unhashed value matches a given Bcrypt hash.
*
* @param string $value
* @param string $hash
* @return bool
*/
public static function check($value, $hash)
{
return crypt($value, $hash) === $hash;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment