Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.1

Bug #3531 Key isnt padded when the original length > 64
Submitted: 2005-02-20 12:56 UTC
From: Jared dot Williams1 at ntlworld dot com Assigned: mfonda
Status: Closed Package: Crypt_HMAC
PHP Version: Irrelevant OS: Windows 2000/IIS
Roadmaps: (Not assigned)    
Subscription  


 [2005-02-20 12:56 UTC] Jared dot Williams1 at ntlworld dot com
Description: ------------ Probably a minor issue, but when a key is reduced in length via the hash function, it then requires padding. $key = (strlen($key) > 64) ? pack($this->_pack, $func($key)) : str_pad($key, 64, chr(0)); Should be something like... if (strlen($key) > 64) $key = pack($this->_pack, $func($key)); if (strlen($key) < 64) $key = str_pad($key, 64, chr(0));

Comments

 [2005-02-20 19:19 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!