From 74e61deb4f9665aba203d65f83d33932281638e6 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Fri, 11 Jan 2013 15:30:06 -0600 Subject: [PATCH] AES: CFB: decrypted strings were being truncated --- phpseclib/Crypt/AES.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpseclib/Crypt/AES.php b/phpseclib/Crypt/AES.php index 8b1efd4b..a0cecf41 100644 --- a/phpseclib/Crypt/AES.php +++ b/phpseclib/Crypt/AES.php @@ -410,7 +410,7 @@ class Crypt_AES extends Crypt_Rijndael { $last_pos = strlen($ciphertext) & 0xFFFFFFF0; 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); } @@ -628,4 +628,4 @@ class Crypt_AES extends Crypt_Rijndael { } // vim: ts=4:sw=4:et: -// vim6: fdl=1: \ No newline at end of file +// vim6: fdl=1: