イントロダクションIntroduction
LaravelのHashファサードは、保存するパスワードに安全なBcryptハッシュを提供しています。Laravelアプリケーションに含まれている、AuthControllerコントローラーを使用していれば、ユーザーから入力された、ハッシュされていないパスワードをBcryptされたパスワードと確認することも面倒を見ます。The Laravel Hash facade provides secure Bcrypt hashing for storing user passwords. If you are using the AuthController controller that is included with your Laravel application, it will be take care of verifying the Bcrypt password against the un-hashed version provided by the user.
同様に、Laravelに初めから用意されているRegistrarサービスは、保存するパスワードに対し、確実にbcrypt関数を呼び出しハッシュ化します。Likewise, the user Registrar service that ships with Laravel makes the proper bcrypt function call to hash stored passwords.
基本的な使用法Basic Usage
Bcryptを使用しパスワードをハッシュするHashing A Password Using Bcrypt
$password = Hash::make('secret');
bcryptヘルパも使用できます。You may also use the bcrypt helper function:
$password = bcrypt('secret');
パスワードをハッシュ済みの値と確認するVerifying A Password Against A Hash
if (Hash::check('secret', $hashedPassword))
{
	// パスワードが一致した…
}
パスワードの再ハッシュが必要か調べるChecking If A Password Needs To Be Rehashed
if (Hash::needsRehash($hashed))
{
	$hashed = Hash::make('secret');
}