cleaning up code before release.

This commit is contained in:
Taylor Otwell
2012-02-16 15:12:42 -06:00
parent bb0967cceb
commit 0e4f726874
2 changed files with 34 additions and 19 deletions

View File

@@ -2,18 +2,6 @@
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.
*
@@ -51,4 +39,16 @@ class Hash {
return crypt($value, '$2a$'.$work.'$'.$salt);
}
/**
* Determine if an unhashed value matches a Bcrypt hash.
*
* @param string $value
* @param string $hash
* @return bool
*/
public static function check($value, $hash)
{
return crypt($value, $hash) === $hash;
}
}