Hash: tweaks to hash pre-computation

This commit is contained in:
terrafrost 2018-10-12 23:04:57 -05:00
parent 685e0abcc6
commit 2d7aadc689

View File

@ -126,6 +126,15 @@ class Crypt_Hash
*/
var $key = false;
/**
* Computed Key
*
* @see self::_computeKey()
* @var string
* @access private
*/
var $computedKey = false;
/**
* Outer XOR (Internal HMAC)
*
@ -209,6 +218,11 @@ class Crypt_Hash
*/
function _computeKey()
{
if ($this->key === false) {
$this->computedKey = false;
return;
}
if (strlen($this->key) <= $this->b) {
$this->computedKey = $this->key;
return;