phpseclib/phpseclib — pull request #43 by petrich (2013-01-04 07:27:08+00:00)
Title: fixed corrupted decrypt() in CTR mode

`$buffer['encrypted']` (which is always empty) should be `$buffer['ciphertext']` or buffered stream will get corrupt...

Example:
```php
define('CRYPT_AES_MODE',CRYPT_AES_MODE_INTERNAL);//in MODE_MCRYPT all is fine
$aes = new Crypt_AES(CRYPT_AES_MODE_CTR);
$aes->setKey(':-8');
$aes->enableContinuousBuffer();
$plaintext = ':-):-):-):-):-):-)';
for($i=0; $iDecrypt($aes->Encrypt($plaintext[$i]));
}
```

Output:
:-):-):-):-):-):-(

Expected:
:-):-):-):-):-):-)

After Bugfix, output is:
:-):-):-):-):-):-)