mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-18 11:15:12 +00:00
AES: CFB: decrypted strings were being truncated
This commit is contained in:
parent
d90caa17e3
commit
74e61deb4f
@ -410,7 +410,7 @@ class Crypt_AES extends Crypt_Rijndael {
|
|||||||
|
|
||||||
$last_pos = strlen($ciphertext) & 0xFFFFFFF0;
|
$last_pos = strlen($ciphertext) & 0xFFFFFFF0;
|
||||||
if ($last_pos) {
|
if ($last_pos) {
|
||||||
$plaintext = mdecrypt_generic($this->demcrypt, substr($ciphertext, 0, $last_pos));
|
$plaintext.= mdecrypt_generic($this->demcrypt, substr($ciphertext, 0, $last_pos));
|
||||||
$this->decryptIV = substr($ciphertext, $last_pos - 16, 16);
|
$this->decryptIV = substr($ciphertext, $last_pos - 16, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user