Merge branch '1.0' into 2.0

This commit is contained in:
terrafrost 2018-10-12 23:05:42 -05:00
commit f938922cfc

View File

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