dpvmtdu364462 2011-07-03 20:32
浏览 36
已采纳

是否值得一遍又一遍地重新密码? [重复]

Possible Duplicate:
Is “double hashing” a password less secure than just hashing it once?

What do I gain by doing it? It slows hashing... does it automatically reduce possibility to somehow find out password from hash?

$password = '123456';

$iterations = 8;

$is_first = true;
for ($i = 0; $i < $iterations; ++$i) {
    if ($is_first === true) {

        $hashed_password = hash('sha256', $password);

    } else {

        $hashed_password = hash('sha256', $hashed_password);

    }

    $is_first = false;
}

If the answer is yes... how many iterations would be optional?

What other options of improving passwords security would you recommend (except salt and peanuts)?

  • 写回答

1条回答 默认 最新

  • dsa111111 2011-07-03 20:39
    关注

    Slowing hashing is good.

    If an enemy gets your password hashes, you want him to be forced to take a long time to try each hash.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题