1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-11-30 04:39:02 +01:00

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;