From a36e2773e2db425be08854f20dd189a1753e208a Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 26 Jan 2012 10:29:19 -0600 Subject: [PATCH] rearrange hash class. --- laravel/hash.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/laravel/hash.php b/laravel/hash.php index 0e348d4f..1da79527 100644 --- a/laravel/hash.php +++ b/laravel/hash.php @@ -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 @@ public static function make($value, $rounds = 8) 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