V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
KiseXu
V2EX  ›  问与答

为什么使用Bcrypt加密不需要加salt

  •  
  •   KiseXu · Jun 28, 2013 · 10264 views
    This topic created in 4692 days ago, the information mentioned may be changed or developed.
    看到网上介绍使用Bcrypt不需要加salt,因为Bcrypt已经自己加了salt。

    如果这是真的,这个salt在哪里,如果更换了服务器环境,加密出的值不就变了么?

    在stackoverflow看到 : http://stackoverflow.com/questions/14673005/how-does-phps-password-hash-generate-the-salt

    说“The salt is created randomly.”我就更加困惑了,求指点,谢谢
    3 replies    1970-01-01 08:00:00 +08:00
    lichao
        1
    lichao  
       Jun 28, 2013
    hash 和 salt 放一起了吧
    KiseXu
        3
    KiseXu  
    OP
       Jun 28, 2013
    @lichao

    非常感谢,明白了

    Bcrypt把算法版本、计算次数和salt都放到hash值里面去了.............
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2443 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 44ms · UTC 07:47 · PVG 15:47 · LAX 00:47 · JFK 03:47
    ♥ Do have faith in what you're doing.