mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-02-11 16:19:01 +00:00
Crypt/Base: fix issue with CBC mode encryption with continuous buffers
This commit is contained in:
parent
e93dc8d272
commit
a95160cb44
@ -698,7 +698,7 @@ class Crypt_Base
|
||||
case CRYPT_MODE_CBC:
|
||||
$result = openssl_encrypt($plaintext, $this->cipher_name_openssl, $this->key, $this->openssl_options, $this->encryptIV);
|
||||
if ($this->continuousBuffer) {
|
||||
$this->encryptIV = substr($ciphertext, -$this->block_size);
|
||||
$this->encryptIV = substr($result, -$this->block_size);
|
||||
}
|
||||
return !defined('OPENSSL_RAW_DATA') ? substr($result, 0, -$this->block_size) : $result;
|
||||
case CRYPT_MODE_CTR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user