Skip to content

Commit

Permalink
Fix: i is not varriable (closes issue escolarea-labs#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Valicek1 committed Oct 30, 2016
1 parent 25e8406 commit c04a7e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions php/aes_fast.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ private static function main($state,$expandedKey,$nbrRounds){
private static function invMain($state, $expandedKey, $nbrRounds){
$state = self::addRoundKey($state, self::createRoundKey($expandedKey,16*$nbrRounds));
for ($i = $nbrRounds-1; $i > 0; $i--)
$state = self::invRound($state, self::createRoundKey($expandedKey,16*i));
$state = self::invRound($state, self::createRoundKey($expandedKey,16*$i));
$state = self::shiftRows($state,true);
$state = self::subBytes($state,true);
$state = self::addRoundKey($state, self::createRoundKey($expandedKey,0));
Expand Down Expand Up @@ -703,4 +703,4 @@ public static function decrypt($cipherIn,$originalsize,$mode,$key,$size,$iv)
*/
}

?>
?>
4 changes: 2 additions & 2 deletions php/aes_small.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private static function main($state,$expandedKey,$nbrRounds){
private static function invMain($state, $expandedKey, $nbrRounds){
$state = self::addRoundKey($state, self::createRoundKey($expandedKey,16*$nbrRounds));
for ($i = $nbrRounds-1; $i > 0; $i--)
$state = self::invRound($state, self::createRoundKey($expandedKey,16*i));
$state = self::invRound($state, self::createRoundKey($expandedKey,16*$i));
$state = self::shiftRows($state,true);
$state = self::subBytes($state,true);
$state = self::addRoundKey($state, self::createRoundKey($expandedKey,0));
Expand Down Expand Up @@ -597,4 +597,4 @@ public static function decrypt($cipherIn,$originalsize,$mode,$key,$size,$iv)
*/
}

?>
?>

0 comments on commit c04a7e3

Please sign in to comment.