加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ruby-on-rails – 设计的database_authenticatable的“延伸”意

发布时间:2020-12-17 03:26:25 所属栏目:百科 来源:网络整理
导读:我在config / initializers / devise.rb中看到,有一个名为“config.stretches”的配置. # == Configuration for :database_authenticatable# For bcrypt,this is the cost for hashing the password and defaults to 10. If# using other encryptors,it sets
我在config / initializers / devise.rb中看到,有一个名为“config.stretches”的配置.

# ==> Configuration for :database_authenticatable
# For bcrypt,this is the cost for hashing the password and defaults to 10. If
# using other encryptors,it sets how many times you want the password re-encrypted.

config.stretches = 10

我不明白延伸是什么意思.它说这是我想要密码“重新加密”的时间.为什么和我们的密码将被重新加密?为什么我要指定一个“时代”?

解决方法

简短的回答是它使暴力字典攻击需要更长时间.

This blog post用相当简单的英语写成,可能会让你更好地了解正在发生的事情.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读