From 492562e0344e49dd8465482aa1ca4645c0df8c4f Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 8 Mar 2019 08:34:33 -0600 Subject: [PATCH] Hash: fix issues with _computeKey --- phpseclib/Crypt/Hash.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpseclib/Crypt/Hash.php b/phpseclib/Crypt/Hash.php index 1042463f..41a49a8e 100644 --- a/phpseclib/Crypt/Hash.php +++ b/phpseclib/Crypt/Hash.php @@ -216,7 +216,7 @@ class Crypt_Hash * * @access private */ - function _computeKey() + function _computeKey($mode) { if ($this->key === false) { $this->computedKey = false; @@ -332,7 +332,7 @@ class Crypt_Hash default: $this->hash = MHASH_SHA1; } - $this->_computeKey(); + $this->_computeKey(CRYPT_HASH_MODE_MHASH); return; case CRYPT_HASH_MODE_HASH: switch ($hash) { @@ -349,7 +349,7 @@ class Crypt_Hash default: $this->hash = 'sha1'; } - $this->_computeKey(); + $this->_computeKey(CRYPT_HASH_MODE_HASH); return; } @@ -375,7 +375,7 @@ class Crypt_Hash $this->ipad = str_repeat(chr(0x36), $this->b); $this->opad = str_repeat(chr(0x5C), $this->b); - $this->_computeKey(); + $this->_computeKey(CRYPT_HASH_MODE_INTERNAL); } /**