diff --git a/application/config/application.php b/application/config/application.php index 9e5964c7..3a1cf2b5 100644 --- a/application/config/application.php +++ b/application/config/application.php @@ -124,7 +124,7 @@ return array( 'Eloquent' => 'Laravel\\Database\\Eloquent\\Model', 'File' => 'Laravel\\File', 'Form' => 'Laravel\\Form', - 'Hasher' => 'Laravel\\Security\\Hasher', + 'Hasher' => 'Laravel\\Security\\Hash', 'HTML' => 'Laravel\\HTML', 'Inflector' => 'Laravel\\Inflector', 'Input' => 'Laravel\\Input', diff --git a/application/config/auth.php b/application/config/auth.php index 56f1872c..c4671f01 100644 --- a/application/config/auth.php +++ b/application/config/auth.php @@ -64,7 +64,7 @@ return array( { $user = User::where($config['username'], '=', $username)->first(); - if ( ! is_null($user) and Hasher::check($password, $user->password)) + if ( ! is_null($user) and Hash::check($password, $user->password)) { return $user; } diff --git a/laravel/security/hasher.php b/laravel/security/hash.php similarity index 92% rename from laravel/security/hasher.php rename to laravel/security/hash.php index 1f2ae08e..49c64ff3 100644 --- a/laravel/security/hasher.php +++ b/laravel/security/hash.php @@ -1,6 +1,6 @@ * // Create a Bcrypt hash of a value - * $hash = Hasher::hash('secret'); + * $hash = Hash::make('secret'); * * // Use a specified number of iterations when creating the hash - * $hash = Hasher::hash('secret', 12); + * $hash = Hash::make('secret', 12); * * * @param string $value * @param int $rounds * @return string */ - public static function hash($value, $rounds = 8) + public static function make($value, $rounds = 8) { return crypt($value, '$2a$'.str_pad($rounds, 2, '0', STR_PAD_LEFT).'$'.static::salt()); }