Laravel 5.4 - auth 使用哪种哈希算法?
Laravel 5.4 - Which hash algorithm is used by auth?
我尝试编写自己的寄存器控制器,但在 documentation 中没有提到 laravel 使用哪种哈希算法。
用的是哪一个?
您可以只使用 bcrypt()
全局助手来创建散列密码:
bcrypt($request->password)
您可以使用 Hash::make($request->password);
您在 post 的标题 ("Which hash algorithm is used by auth?") 中的问题的答案可以在 mnshankar.wordpress.com - Laravel Hash::make() explained 上找到。
这是来自链接博客 How? 部分的第一句话 post:
Internally, Hash::make() encrypts using the bcrypt function and Blowfish algorithm.
此外,您可以在 Laravel 5.4 docs - Hashing page 上看到他们说:
The Laravel Hash facade provides secure Bcrypt hashing for storing user passwords.
我尝试编写自己的寄存器控制器,但在 documentation 中没有提到 laravel 使用哪种哈希算法。
用的是哪一个?
您可以只使用 bcrypt()
全局助手来创建散列密码:
bcrypt($request->password)
您可以使用 Hash::make($request->password);
您在 post 的标题 ("Which hash algorithm is used by auth?") 中的问题的答案可以在 mnshankar.wordpress.com - Laravel Hash::make() explained 上找到。
这是来自链接博客 How? 部分的第一句话 post:
Internally, Hash::make() encrypts using the bcrypt function and Blowfish algorithm.
此外,您可以在 Laravel 5.4 docs - Hashing page 上看到他们说:
The Laravel Hash facade provides secure Bcrypt hashing for storing user passwords.