且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Symfony2自定义密码编码器(bcrypt)

更新时间:2023-11-19 18:58:52

截至2011年11月,在Symfony 2.2之前,尚无直接支持.

As of November 2011, before Symfony 2.2, this is not directly supported.

我建议您使用我写的 Blowfish密码编码器捆绑包(ElnurBlowfishPasswordEncoderBundle),而不是重新发明***,它可以解决相同的问题.或者,至少,您可以看到它是如何实现的.

Instead of reinventing the wheel, I suggest you to use the Blowfish Password Encoder bundle I wrote (ElnurBlowfishPasswordEncoderBundle), which solves the same problem. Or, at least, you can see how it's implemented.

如果您使用的是Symfony 2.2或更高版本,请有关配置的信息,请参见Seldaek的答案说明.

If you're using Symfony 2.2 or later, see Seldaek's answer for configuration instructions.