mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
unset($block);
Optional but increase quality Score
This commit is contained in:
parent
0efd3176d8
commit
80c7ee9eaf
@ -326,7 +326,7 @@ class Salsa20 extends StreamCipher
|
|||||||
foreach ($blocks as &$block) {
|
foreach ($blocks as &$block) {
|
||||||
$block ^= static::salsa20($this->p1 . pack('V', $i++) . $this->p2);
|
$block ^= static::salsa20($this->p1 . pack('V', $i++) . $this->p2);
|
||||||
}
|
}
|
||||||
|
unset($block);
|
||||||
return implode('', $blocks);
|
return implode('', $blocks);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,6 +366,7 @@ class Salsa20 extends StreamCipher
|
|||||||
foreach ($blocks as &$block) {
|
foreach ($blocks as &$block) {
|
||||||
$block ^= static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
|
$block ^= static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
|
||||||
}
|
}
|
||||||
|
unset($block);
|
||||||
}
|
}
|
||||||
$encrypted = implode('', $blocks);
|
$encrypted = implode('', $blocks);
|
||||||
$temp = static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
|
$temp = static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
|
||||||
@ -388,6 +389,7 @@ class Salsa20 extends StreamCipher
|
|||||||
foreach ($blocks as &$block) {
|
foreach ($blocks as &$block) {
|
||||||
$block ^= static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
|
$block ^= static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
|
||||||
}
|
}
|
||||||
|
unset($block);
|
||||||
$ciphertext .= implode('', $blocks);
|
$ciphertext .= implode('', $blocks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user