php/php-src — pull request #105 by ircmaxell (2012-06-12 17:45:03+00:00)
Title: Create hash_pbkdf2 function addition

This pull request adds a new function to the hash package: `hash_pbkdf2()`, providing the ability to natively hash content using the PKCS5 approved PBKDF2 algorithm. See [Wikipedia](http://en.wikipedia.org/wiki/PBKDF2) and [RSA](http://www.rsa.com/rsalabs/node.asp?id=2127) for more information about the algorithm.

This patch refactors the internal implementation of `hash_hmac()` to allow code reuse between it and the new `hash_pbkdf2()` function. No internal APIs were changed, and the only API addition is the PHP function `hash_pbkdf2()`. A few `static inline` functions were either added, or extracted from the inside of `hash_hmac` and its implementation. These refactorings should have no public impact, since they are static to the extension.