【发布时间】:2019-04-01 08:12:34
【问题描述】:
我在 MD5 中有密码,我想在 Laravel 5.4 中导入用户,因为 Laravel 不允许使用基于 md5 的导入用户登录,因为 bcrypt 哈希。
1) Is there any way to use MD5 instead of bcrypt?
2) How can I use the original password to store in Laravel with default bcrypt?
这样做的主要目的是在 Laravel 5.4 中导入用户后在 Laravel 中使用 md5 加密密码。
【问题讨论】:
-
重复问题,这可能会对您有所帮助stackoverflow.com/questions/42176866/…
-
仅使用散列函数是不够的,仅添加盐对提高安全性无济于事。相反,iIterate over an HMAC with a random salt for about 100ms duration and save the salt with the hash.使用
PBKDF2、Rfc2898DeriveBytes、password_hash、Bcrypt等函数或类似函数。关键是让攻击者花费大量时间通过蛮力寻找密码。
标签: authentication laravel-5 hash bcrypt laravel-5.4