mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 11:37:33 +00:00
Hash: tweaks to hash pre-computation
This commit is contained in:
parent
685e0abcc6
commit
2d7aadc689
@ -126,6 +126,15 @@ class Crypt_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)
|
||||||
*
|
*
|
||||||
@ -209,6 +218,11 @@ class Crypt_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;
|
||||||
|
Loading…
Reference in New Issue
Block a user