Edit report at https://bugs.php.net/bug.php?id=60813&edit=1

 ID:                 60813
 Updated by:         ircmax...@php.net
 Reported by:        ircmax...@php.net
 Summary:            Implement PBKDF2 function in hash
-Status:             Open
+Status:             Closed
 Type:               Feature/Change Request
 Package:            hash related
 Operating System:   All
 PHP Version:        trunk-SVN-2012-01-19 (snap)
-Assigned To:        
+Assigned To:        ircmaxell
 Block user comment: N
 Private report:     N

 New Comment:

Implemented in 5.5.0


Previous Comments:
------------------------------------------------------------------------
[2012-06-12 17:47:25] ircmax...@php.net

This has been submitted as a pull request. RFC to follow:

https://github.com/php/php-src/pull/105

------------------------------------------------------------------------
[2012-01-19 22:00:52] ircmax...@php.net

Description:
------------
I propose to implment a PBKDF2 derivation function in the hash package as 
hash_pbkdf2().  PBKDF2 is defined in PKCS#5 (RFC 2898).  The method for 
password 
hash derivation is currently used by Blackberry, Apple iOS, Microsoft, 
OpenOffice, 
and more (not all for password storage, but all for password based hashing).

The patch also cleans up hash_hmac a little bit to split out some common 
functionality into a few inline functions (since PBKDF2 relies heavily on hmac).

Test script:
---------------
<?php

echo hash_pbkdf2('sha1', 'password', 'salt', 1, 20) . "\n\n";
echo hash_pbkdf2('sha256', 'password', 'salt', 10000, 64) . "\n\n";


Expected result:
----------------
0c60c80f961f0e71f3a9

5ec02b91a4b59c6f59dd5fbe4ca649ece4fa8568cdb8ba36cf41426e8805522



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60813&edit=1

Reply via email to