mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-30 02:28:31 +00:00
Merge branch '1.0' into 3.0
This commit is contained in:
commit
d925e66677
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user