简体   繁体   中英

What should I do if password_hash isn't supported

I have a web server that runs PHP 5.4.x, which means it doesn't support the password_hash function, so I can't hash passwords. I cannot upgrade the PHP version.

How can I protect passwords without the password_hash function ?

You should take a look at https://github.com/ircmaxell/password_compat

This library is intended to provide forward compatibility with the password_* functions that ship with PHP 5.5.

Have a look at crypt function

You can also use password_compat . It's a backward compatible library to emulate password_hash() in older versions of PHP (5.3.7+).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM