On Sat, May 18, 2013 at 11:48 AM, Nikita Popov <nikita....@gmail.com> wrote:
> Hi internals! > > I just noticed that we added the PBKDF2 algorithm two times in PHP 5.5. > Once in the hash extension, once in the OpenSSL extension. > > The hash_pbkdf2 function was added via this RFC: > https://wiki.php.net/rfc/hash_pbkdf2 > > The openssl_pbkdf2 function probably was not noticed at that time because > it was just commited, but not mentioned anywhere else (NEWS, UPGRADING, > etc). Only saw it in vrana's documentation updates just now. The relevant > commit is here: https://github.com/php/php-src/commit/f4847ef > > It would be nice if we could have only one of those functions. I'm > currently tending towards the hash_ variant because of the commit message > of the openssl_ function: > > > No easy way to put these in the hash extension since we don't really > support optional > > parameters to certain algorithms. Implemented in openssl for now since > it has it already > > and is pretty stable. > > > > Only SHA1 is confirmed to work as an algorithm but openssl has a > parameter so it can be > > changed in the future. > > It seems that the author already would have preferred it in the hash > extension and that the openssl variant only works with sha1 (or was only > tested with it? not sure). > > Nikita > No more opinions? It would be nice to have this resolved before 5.5, otherwise there will be no way back. Nikita