unset($block);

Optional but increase quality Score
This commit is contained in:
jmarchan-ByTel 2024-12-02 22:02:37 +01:00 committed by terrafrost
parent 0efd3176d8
commit 80c7ee9eaf

View File

@ -326,7 +326,7 @@ class Salsa20 extends StreamCipher
foreach ($blocks as &$block) {
$block ^= static::salsa20($this->p1 . pack('V', $i++) . $this->p2);
}
unset($block);
return implode('', $blocks);
}
@ -366,6 +366,7 @@ class Salsa20 extends StreamCipher
foreach ($blocks as &$block) {
$block ^= static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
}
unset($block);
}
$encrypted = implode('', $blocks);
$temp = static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
@ -388,6 +389,7 @@ class Salsa20 extends StreamCipher
foreach ($blocks as &$block) {
$block ^= static::salsa20($this->p1 . pack('V', $buffer['counter']++) . $this->p2);
}
unset($block);
$ciphertext .= implode('', $blocks);
}
}