phpseclib/phpseclib — pull request #61 by petrich (2013-01-21 03:22:54+00:00)
Title: AES: Fixed CFB decrypt() using MODE_MCRYPT and ContinuousBuffer

Hi Terra, just a small bug in the last AES.php commit...

AES: Fixed small bug from commit https://github.com/phpseclib/phpseclib/commit/d94f1b252db66f52c42fcc8d4c6f1a3f10f5ff4e (AES.php in line 425-426)
in CFB decrypt() using CRYPT_AES_MODE_MCRYPT and enableContinuousBuffer()

Example:
```php
define('CRYPT_AES_MODE',CRYPT_AES_MODE_MCRYPT);

$cipher = new Crypt_AES(CRYPT_AES_MODE_CFB);
$cipher->enableContinuousBuffer();
echo bin2hex($cipher->decrypt('12345678901234567'));
echo "\n";

$cipher = new Crypt_AES(CRYPT_AES_MODE_CFB);
echo bin2hex($cipher->decrypt('12345678901234567'));
```

Output:
57db78e0dabc1b03b17ccb6bf9001e1870ca20d89cebe6b1cecf03b29e9319bc
57db78e0dabc1b03b17ccb6bf9001e1876

Expected:
57db78e0dabc1b03b17ccb6bf9001e1876
57db78e0dabc1b03b17ccb6bf9001e1876

Output after Bugfix:
57db78e0dabc1b03b17ccb6bf9001e1876
57db78e0dabc1b03b17ccb6bf9001e1876