- fix an E_NOTE error in Rijndael.php (thanks, tchamness!)

git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@164 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
Jim Wigginton 2011-06-04 16:10:05 +00:00
parent 48494b64c8
commit 96471cf1dd

View File

@ -808,7 +808,7 @@ class Crypt_Rijndael {
break; break;
case CRYPT_RIJNDAEL_MODE_CTR: case CRYPT_RIJNDAEL_MODE_CTR:
$xor = $this->decryptIV; $xor = $this->decryptIV;
if (strlen($buffer)) { if (!empty($buffer)) {
for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) { for ($i = 0; $i < strlen($ciphertext); $i+=$block_size) {
$block = substr($ciphertext, $i, $block_size); $block = substr($ciphertext, $i, $block_size);
$buffer.= $this->_encryptBlock($this->_generate_xor($block_size, $xor)); $buffer.= $this->_encryptBlock($this->_generate_xor($block_size, $xor));