mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-09-19 11:09:02 +00:00
Crypt_Base: fix the rest of the E_NOTICEs
This commit is contained in:
parent
6c09d6f565
commit
129dc320b0
@ -2154,16 +2154,16 @@ class Crypt_Base
|
|||||||
$_plaintext_len = strlen($_text);
|
$_plaintext_len = strlen($_text);
|
||||||
$_xor = $self->encryptIV;
|
$_xor = $self->encryptIV;
|
||||||
$_buffer = &$self->enbuffer;
|
$_buffer = &$self->enbuffer;
|
||||||
if (strlen($_buffer["encrypted"])) {
|
if (strlen($_buffer["ciphertext"])) {
|
||||||
for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {
|
for ($_i = 0; $_i < $_plaintext_len; $_i+= '.$block_size.') {
|
||||||
$_block = substr($_text, $_i, '.$block_size.');
|
$_block = substr($_text, $_i, '.$block_size.');
|
||||||
if (strlen($_block) > strlen($_buffer["encrypted"])) {
|
if (strlen($_block) > strlen($_buffer["ciphertext"])) {
|
||||||
$in = $_xor;
|
$in = $_xor;
|
||||||
'.$encrypt_block.'
|
'.$encrypt_block.'
|
||||||
$self->_increment_str($_xor);
|
$self->_increment_str($_xor);
|
||||||
$_buffer["encrypted"].= $in;
|
$_buffer["ciphertext"].= $in;
|
||||||
}
|
}
|
||||||
$_key = $self->_string_shift($_buffer["encrypted"], '.$block_size.');
|
$_key = $self->_string_shift($_buffer["ciphertext"], '.$block_size.');
|
||||||
$_ciphertext.= $_block ^ $_key;
|
$_ciphertext.= $_block ^ $_key;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2179,7 +2179,7 @@ class Crypt_Base
|
|||||||
if ($self->continuousBuffer) {
|
if ($self->continuousBuffer) {
|
||||||
$self->encryptIV = $_xor;
|
$self->encryptIV = $_xor;
|
||||||
if ($_start = $_plaintext_len % '.$block_size.') {
|
if ($_start = $_plaintext_len % '.$block_size.') {
|
||||||
$_buffer["encrypted"] = substr($_key, $_start) . $_buffer["encrypted"];
|
$_buffer["ciphertext"] = substr($_key, $_start) . $_buffer["ciphertext"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user