Merge branch '2.0'

This commit is contained in:
terrafrost 2018-10-13 00:50:48 -05:00
commit 3df87e8632

View File

@ -109,6 +109,15 @@ class Hash
*/ */
private $parameters = []; private $parameters = [];
/**
* Computed Key
*
* @see self::_computeKey()
* @var string
* @access private
*/
private $computedKey = false;
/** /**
* Outer XOR (Internal HMAC) * Outer XOR (Internal HMAC)
* *
@ -170,6 +179,11 @@ class Hash
*/ */
private function computeKey() private function computeKey()
{ {
if ($this->key === false) {
$this->computedKey = false;
return;
}
if (strlen($this->key) <= $this->getBlockLengthInBytes()) { if (strlen($this->key) <= $this->getBlockLengthInBytes()) {
$this->computedKey = $this->key; $this->computedKey = $this->key;
return; return;