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:
parent
685e0abcc6
commit
2d7aadc689
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user