php – laravel密码盐存储在哪里?

Laravel使用bcrypt来哈希密码.

根据这篇文章,在这个过程的某个时刻,Hash :: make函数创建并使用一个22长的随机字符串作为salt来生成密码.

对于单个不同的密码,Hash :: make会返回唯一的哈希值,暗示它确实在进程中的某个地方使用某种salting.

但是这些盐并没有存储在用户表中,我希望它们存在于用户表中. laravel如何知道用于验证密码的相应哈希?

Laravel Hash Explained

解决方法:

链接文章似乎包含答案.
https://mnshankar.wordpress.com/2014/03/29/laravel-hash-make-explained/

The cLeverness of this is that the algorithm, salt and cost are
embedded into the hash and so can be easily parsed out into
individual components for reconstruction/verification (Please see
relevant sections of the PHP crypt source code at
07001).
Because of this, you don’t need to store the salt/cost separately in a
database table.

相关文章

统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...
前言 之前做了微信登录,所以总结一下微信授权登录并获取用户...
FastAdmin是我第一个接触的后台管理系统框架。FastAdmin是一...
之前公司需要一个内部的通讯软件,就叫我做一个。通讯软件嘛...
统一支付是JSAPI/NATIVE/APP各种支付场景下生成支付订单,返...