【发布时间】:2018-06-15 09:41:06
【问题描述】:
我正在尝试手动创建 200 个字符的 salt,并将其与 md5 一起用作参数,以使用我的 SLIM3 web-app 项目之一来保护密码
string hash ( string $algo , string $data [, bool $raw_output = FALSE ] )
我希望每次随机创建盐以使其更安全。 PHP5.3 中最好的方法是什么?
【问题讨论】:
-
请不要在密码附近的任何地方使用 md5 这个词。它坏得可怕。如有必要,使用the PHP API 和a backwards compatibility package(它将在 PHP 5.3 上使用)。
-
您不应再使用严重过时的 PHP 5.3,也不应编写自己的哈希算法,而应使用内置算法。
-
所有其他的东西都是 5.3 所以不能改变。这将需要大量的人力资源。 @nico-haase
标签: php slim password-protection password-hash salt-creation