Merge branch '1.0' into 3.0

This commit is contained in:
terrafrost 2022-02-01 06:33:46 -06:00
commit d925e66677

View File

@ -1378,8 +1378,8 @@ abstract class SymmetricKey
$block = substr($plaintext, $i, $block_size); $block = substr($plaintext, $i, $block_size);
if (strlen($block) > strlen($buffer['ciphertext'])) { if (strlen($block) > strlen($buffer['ciphertext'])) {
$buffer['ciphertext'].= $this->encryptBlock($xor); $buffer['ciphertext'].= $this->encryptBlock($xor);
Strings::increment_str($xor);
} }
Strings::increment_str($xor);
$key = Strings::shift($buffer['ciphertext'], $block_size); $key = Strings::shift($buffer['ciphertext'], $block_size);
$ciphertext.= $block ^ $key; $ciphertext.= $block ^ $key;
} }
@ -1751,8 +1751,8 @@ abstract class SymmetricKey
$block = substr($ciphertext, $i, $block_size); $block = substr($ciphertext, $i, $block_size);
if (strlen($block) > strlen($buffer['ciphertext'])) { if (strlen($block) > strlen($buffer['ciphertext'])) {
$buffer['ciphertext'].= $this->encryptBlock($xor); $buffer['ciphertext'].= $this->encryptBlock($xor);
Strings::increment_str($xor);
} }
Strings::increment_str($xor);
$key = Strings::shift($buffer['ciphertext'], $block_size); $key = Strings::shift($buffer['ciphertext'], $block_size);
$plaintext.= $block ^ $key; $plaintext.= $block ^ $key;
} }