开发者

Is there any way to use bcrypt "hashing" in PHP 5.2?

I'm running a website with password hashing, but I think the current algorithm is insufficient. I tried to use PHP's crypt() with the blowfish option, but my PHP version is only 5.2 so CRYPT_BLOWFISH is not enabled.

I've seen 3rd party libraries that can encrypt via Blowfish, but none that do the full Bcrypt hashing. Is there any PHP library you know of that has bcrypt hashing without use of the crypt() function? Or, even better, any method of feeding a 3rd party blowfish encryption algorithm into a 3rd party bcrypt hash开发者_如何学Cing algorithm?

Just to clarify, I am not able to install a newer version of PHP, as I'm on shared hosting.

I would really appreciate any suggestions! Thanks!


If you can install the Suhosin extension, bcrypt will work with Blowfish. (You don't need to recompile PHP, the extension is enough.)

On Ubuntu, you install it like this:

sudo apt-get install php5-suhosin


Thanks everyone for your answers, but to make things easier for now I've decided to just get the PECL perl package and use Crypt:Eksblowfish.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜