mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-28 17:48:35 +00:00
- fixed a warning in Crypt_Rijndael
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@123 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
76655b8bf9
commit
2140de74d0
@ -64,7 +64,7 @@
|
|||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @copyright MMVIII Jim Wigginton
|
* @copyright MMVIII Jim Wigginton
|
||||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||||
* @version $Id: Rijndael.php,v 1.14 2010-09-26 03:10:20 terrafrost Exp $
|
* @version $Id: Rijndael.php,v 1.15 2010-09-26 05:02:10 terrafrost Exp $
|
||||||
* @link http://phpseclib.sourceforge.net
|
* @link http://phpseclib.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -684,7 +684,7 @@ class Crypt_Rijndael {
|
|||||||
break;
|
break;
|
||||||
case CRYPT_RIJNDAEL_MODE_CTR:
|
case CRYPT_RIJNDAEL_MODE_CTR:
|
||||||
$xor = $this->encryptIV;
|
$xor = $this->encryptIV;
|
||||||
if (strlen($buffer)) {
|
if (!empty($buffer)) {
|
||||||
for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
|
for ($i = 0; $i < strlen($plaintext); $i+=$block_size) {
|
||||||
$block = substr($plaintext, $i, $block_size);
|
$block = substr($plaintext, $i, $block_size);
|
||||||
$buffer.= $this->_encryptBlock($this->_generate_xor($block_size, $xor));
|
$buffer.= $this->_encryptBlock($this->_generate_xor($block_size, $xor));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user