Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的一个烧瓶项目中,我将Flask-security模块用于安全机制。在模块配置中,密码散列算法bcrypt、sha512_crypt、pbkdf2_sha512有 3 种选择。
任何人都可以建议我使用哪个,为什么?
任何帮助,将不胜感激。
所有这些都是可以接受的选择。我更喜欢 bcrypt,因为它对 GPU 不友好,所以当攻击者使用 GPU 而你的服务器使用 CPU 进行散列时,他们不会有很大的优势。
确保选择尽可能大的工作系数,同时提供可接受的性能。对于典型的 Web 服务器,应该在 10 到 100 毫秒之间。