KiseXu
V2EX  ›  问与答

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

  •  
  •   KiseXu · Jun 28, 2013 · 10309 views
    This topic created in 4715 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   ·   3430 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 10:44 · PVG 18:44 · LAX 03:44 · JFK 06:44
    ♥ Do have faith in what you're doing.