4 ms·
This page is old. Nowadays, PHP developers are encouraged to use password_hash() and password_verify(). But if you want PBKDF2, defuse's github has more up-to-
by sarciszewski 12y ago
This page is old. Nowadays, PHP developers are encouraged to use password_hash() and password_verify().
But if you want PBKDF2, defuse's github has more up-to-date code that, IIRC, he hasn't taken the time to copy/paste into the page linked.
https://github.com/defuse/password-hashing https://github.com/defuse/password-hashing
- McGlockenshire 12y agoIf you want PBKDF2 and are using PHP >= 5.5, there's the hash_pbkdf2 function built in to ext/hash, which should be available by default in most installations. There's also another implementation in PHP-CryptLib by Anthony Ferrara, the gentlemen that brought the current password API to PHP. https://github.com/ircmaxell/PHP-CryptLib https://github.com/ircmaxell/PHP-CryptLib
- sarciszewski 12y agoThe PBKDF2 code that defuse wrote will use hash_pbkdf2() if it's available. :)