Is there a way to use bcrypt hashing in PHP 5.2?

I am running a website with password hashing, but I think the current algorithm is insufficient. I tried using PHP crypt () with the blowfish parameter, but my PHP version is only 5.2, so CRYPT_BLOWFISH is not included.

I have seen third-party libraries that can be encrypted through Blowfish, but none of them do full Bcrypt hashing. Is there any PHP library that you know that has bcrypt hashing without using the crypt () function? Or, even better, any way to feed a third blowfish encryption algorithm into a third-party bcrypt hash algorithm?

Just to clarify, I can’t install a newer version of PHP because I am on a shared hosting.

I would really appreciate any suggestions! Thanks!

+6
source share
2 answers

If you can install the Suhosin extension , bcrypt will work with Blowfish. (You do not need to recompile PHP, extensions are enough.)

On Ubuntu, you install it as follows:

sudo apt-get install php5-suhosin 
+2
source

Thank you all for your answers, but now everything has been simplified. I decided to just get the PECL perl package and use Crypt: Eksblowfish.

+1
source

Source: https://habr.com/ru/post/894691/


All Articles