Completed
Push — development ( 6a24df...5afdf5 )
by Nils
07:52
created
includes/libraries/Authentication/phpseclib/Crypt/Random.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -95,12 +95,12 @@
 block discarded – undo
95 95
             session_cache_limiter('');
96 96
             session_start();
97 97
 
98
-            $v = (isset($_SERVER) ? self::safe_serialize($_SERVER) : '') .
99
-                    (isset($_POST) ? self::safe_serialize($_POST) : '') .
100
-                    (isset($_GET) ? self::safe_serialize($_GET) : '') .
101
-                    (isset($_COOKIE) ? self::safe_serialize($_COOKIE) : '') .
102
-                    self::safe_serialize($GLOBALS) .
103
-                    self::safe_serialize($_SESSION) .
98
+            $v = (isset($_SERVER) ? self::safe_serialize($_SERVER) : '').
99
+                    (isset($_POST) ? self::safe_serialize($_POST) : '').
100
+                    (isset($_GET) ? self::safe_serialize($_GET) : '').
101
+                    (isset($_COOKIE) ? self::safe_serialize($_COOKIE) : '').
102
+                    self::safe_serialize($GLOBALS).
103
+                    self::safe_serialize($_SESSION).
104 104
                     self::safe_serialize($_OLD_SESSION);
105 105
             $v = $seed = $_SESSION['seed'] = sha1($v, true);
106 106
             if (!isset($_SESSION['count'])) {
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/Blowfish.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -419,18 +419,18 @@  discard block
 block discarded – undo
419 419
         $l = $in[1];
420 420
         $r = $in[2];
421 421
 
422
-        for ($i = 0; $i < 16; $i+= 2) {
423
-            $l^= $p[$i];
424
-            $r^= ($sb_0[$l >> 24 & 0xff]  +
425
-                  $sb_1[$l >> 16 & 0xff]  ^
426
-                    $sb_2[$l >>  8 & 0xff]) +
427
-                  $sb_3[$l       & 0xff];
428
-
429
-            $r^= $p[$i + 1];
430
-            $l^= ($sb_0[$r >> 24 & 0xff]  +
431
-                  $sb_1[$r >> 16 & 0xff]  ^
432
-                    $sb_2[$r >>  8 & 0xff]) +
433
-                  $sb_3[$r       & 0xff];
422
+        for ($i = 0; $i < 16; $i += 2) {
423
+            $l ^= $p[$i];
424
+            $r ^= ($sb_0[$l >> 24 & 0xff] +
425
+                  $sb_1[$l >> 16 & 0xff] ^
426
+                    $sb_2[$l >> 8 & 0xff]) +
427
+                  $sb_3[$l & 0xff];
428
+
429
+            $r ^= $p[$i + 1];
430
+            $l ^= ($sb_0[$r >> 24 & 0xff] +
431
+                  $sb_1[$r >> 16 & 0xff] ^
432
+                    $sb_2[$r >> 8 & 0xff]) +
433
+                  $sb_3[$r & 0xff];
434 434
         }
435 435
         return pack("N*", $r ^ $p[17], $l ^ $p[16]);
436 436
     }
@@ -454,18 +454,18 @@  discard block
 block discarded – undo
454 454
         $l = $in[1];
455 455
         $r = $in[2];
456 456
 
457
-        for ($i = 17; $i > 2; $i-= 2) {
458
-            $l^= $p[$i];
459
-            $r^= ($sb_0[$l >> 24 & 0xff]  +
460
-                  $sb_1[$l >> 16 & 0xff]  ^
461
-                    $sb_2[$l >>  8 & 0xff]) +
462
-                  $sb_3[$l       & 0xff];
463
-
464
-            $r^= $p[$i - 1];
465
-            $l^= ($sb_0[$r >> 24 & 0xff]  +
466
-                  $sb_1[$r >> 16 & 0xff]  ^
467
-                    $sb_2[$r >>  8 & 0xff]) +
468
-                  $sb_3[$r       & 0xff];
457
+        for ($i = 17; $i > 2; $i -= 2) {
458
+            $l ^= $p[$i];
459
+            $r ^= ($sb_0[$l >> 24 & 0xff] +
460
+                  $sb_1[$l >> 16 & 0xff] ^
461
+                    $sb_2[$l >> 8 & 0xff]) +
462
+                  $sb_3[$l & 0xff];
463
+
464
+            $r ^= $p[$i - 1];
465
+            $l ^= ($sb_0[$r >> 24 & 0xff] +
466
+                  $sb_1[$r >> 16 & 0xff] ^
467
+                    $sb_2[$r >> 8 & 0xff]) +
468
+                  $sb_3[$r & 0xff];
469 469
         }
470 470
         return pack("N*", $r ^ $p[0], $l ^ $p[1]);
471 471
     }
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/RSA/PKCS1.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -120,15 +120,15 @@
 block discarded – undo
120 120
             $cipher->setKey(self::generateSymmetricKey($password, $iv, $cipher->getKeyLength() >> 3));
121 121
             $cipher->setIV($iv);
122 122
             $iv = strtoupper(Hex::encode($iv));
123
-            $RSAPrivateKey = "-----BEGIN RSA PRIVATE KEY-----\r\n" .
124
-                        "Proc-Type: 4,ENCRYPTED\r\n" .
125
-                        "DEK-Info: " . self::$defaultEncryptionAlgorithm . ",$iv\r\n" .
126
-                        "\r\n" .
127
-                        chunk_split(Base64::encode($cipher->encrypt($RSAPrivateKey)), 64) .
123
+            $RSAPrivateKey = "-----BEGIN RSA PRIVATE KEY-----\r\n".
124
+                        "Proc-Type: 4,ENCRYPTED\r\n".
125
+                        "DEK-Info: ".self::$defaultEncryptionAlgorithm.",$iv\r\n".
126
+                        "\r\n".
127
+                        chunk_split(Base64::encode($cipher->encrypt($RSAPrivateKey)), 64).
128 128
                         '-----END RSA PRIVATE KEY-----';
129 129
         } else {
130
-            $RSAPrivateKey = "-----BEGIN RSA PRIVATE KEY-----\r\n" .
131
-                        chunk_split(Base64::encode($RSAPrivateKey), 64) .
130
+            $RSAPrivateKey = "-----BEGIN RSA PRIVATE KEY-----\r\n".
131
+                        chunk_split(Base64::encode($RSAPrivateKey), 64).
132 132
                         '-----END RSA PRIVATE KEY-----';
133 133
         }
134 134
 
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/RSA/PuTTY.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -287,9 +287,9 @@
 block discarded – undo
287 287
             strlen($n),
288 288
             $n
289 289
         );
290
-        $key = "---- BEGIN SSH2 PUBLIC KEY ----\r\n" .
291
-                'Comment: "' . str_replace(array('\\', '"'), array('\\\\', '\"'), self::$comment) . "\"\r\n";
292
-                chunk_split(Base64::encode($key), 64) .
290
+        $key = "---- BEGIN SSH2 PUBLIC KEY ----\r\n".
291
+                'Comment: "'.str_replace(array('\\', '"'), array('\\\\', '\"'), self::$comment)."\"\r\n";
292
+                chunk_split(Base64::encode($key), 64).
293 293
                 '---- END SSH2 PUBLIC KEY ----';
294 294
 
295 295
         return $key;
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/RSA/PKCS8.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -149,12 +149,12 @@
 block discarded – undo
149 149
 
150 150
             $RSAPrivateKey = pack('Ca*a*', self::ASN1_SEQUENCE, ASN1::encodeLength(strlen($RSAPrivateKey)), $RSAPrivateKey);
151 151
 
152
-            $RSAPrivateKey = "-----BEGIN ENCRYPTED PRIVATE KEY-----\r\n" .
153
-                    chunk_split(Base64::encode($RSAPrivateKey), 64) .
152
+            $RSAPrivateKey = "-----BEGIN ENCRYPTED PRIVATE KEY-----\r\n".
153
+                    chunk_split(Base64::encode($RSAPrivateKey), 64).
154 154
                     '-----END ENCRYPTED PRIVATE KEY-----';
155 155
         } else {
156
-            $RSAPrivateKey = "-----BEGIN PRIVATE KEY-----\r\n" .
157
-                    chunk_split(Base64::encode($RSAPrivateKey), 64) .
156
+            $RSAPrivateKey = "-----BEGIN PRIVATE KEY-----\r\n".
157
+                    chunk_split(Base64::encode($RSAPrivateKey), 64).
158 158
                     '-----END PRIVATE KEY-----';
159 159
         }
160 160
 
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/RSA/XML.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -118,15 +118,15 @@  discard block
 block discarded – undo
118 118
         if (count($primes) != 2) {
119 119
             return false;
120 120
         }
121
-        return "<RSAKeyValue>\r\n" .
122
-                '  <Modulus>' . Base64::encode($n->toBytes()) . "</Modulus>\r\n" .
123
-                '  <Exponent>' . Base64::encode($e->toBytes()) . "</Exponent>\r\n" .
124
-                '  <P>' . Base64::encode($primes[1]->toBytes()) . "</P>\r\n" .
125
-                '  <Q>' . Base64::encode($primes[2]->toBytes()) . "</Q>\r\n" .
126
-                '  <DP>' . Base64::encode($exponents[1]->toBytes()) . "</DP>\r\n" .
127
-                '  <DQ>' . Base64::encode($exponents[2]->toBytes()) . "</DQ>\r\n" .
128
-                '  <InverseQ>' . Base64::encode($coefficients[2]->toBytes()) . "</InverseQ>\r\n" .
129
-                '  <D>' . Base64::encode($d->toBytes()) . "</D>\r\n" .
121
+        return "<RSAKeyValue>\r\n".
122
+                '  <Modulus>'.Base64::encode($n->toBytes())."</Modulus>\r\n".
123
+                '  <Exponent>'.Base64::encode($e->toBytes())."</Exponent>\r\n".
124
+                '  <P>'.Base64::encode($primes[1]->toBytes())."</P>\r\n".
125
+                '  <Q>'.Base64::encode($primes[2]->toBytes())."</Q>\r\n".
126
+                '  <DP>'.Base64::encode($exponents[1]->toBytes())."</DP>\r\n".
127
+                '  <DQ>'.Base64::encode($exponents[2]->toBytes())."</DQ>\r\n".
128
+                '  <InverseQ>'.Base64::encode($coefficients[2]->toBytes())."</InverseQ>\r\n".
129
+                '  <D>'.Base64::encode($d->toBytes())."</D>\r\n".
130 130
                 '</RSAKeyValue>';
131 131
     }
132 132
 
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
      */
141 141
     static function savePublicKey(BigInteger $n, BigInteger $e)
142 142
     {
143
-        return "<RSAKeyValue>\r\n" .
144
-                '  <Modulus>' . Base64::encode($n->toBytes()) . "</Modulus>\r\n" .
145
-                '  <Exponent>' . Base64::encode($e->toBytes()) . "</Exponent>\r\n" .
143
+        return "<RSAKeyValue>\r\n".
144
+                '  <Modulus>'.Base64::encode($n->toBytes())."</Modulus>\r\n".
145
+                '  <Exponent>'.Base64::encode($e->toBytes())."</Exponent>\r\n".
146 146
                 '</RSAKeyValue>';
147 147
     }
148 148
 }
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/DES.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -708,12 +708,12 @@  discard block
 block discarded – undo
708 708
         // Do the initial IP permutation.
709 709
         $t = unpack('Nl/Nr', $block);
710 710
         list($l, $r) = array($t['l'], $t['r']);
711
-        $block = ($shuffleip[ $r        & 0xFF] & "\x80\x80\x80\x80\x80\x80\x80\x80") |
712
-                    ($shuffleip[($r >>  8) & 0xFF] & "\x40\x40\x40\x40\x40\x40\x40\x40") |
711
+        $block = ($shuffleip[$r & 0xFF] & "\x80\x80\x80\x80\x80\x80\x80\x80") |
712
+                    ($shuffleip[($r >> 8) & 0xFF] & "\x40\x40\x40\x40\x40\x40\x40\x40") |
713 713
                     ($shuffleip[($r >> 16) & 0xFF] & "\x20\x20\x20\x20\x20\x20\x20\x20") |
714 714
                     ($shuffleip[($r >> 24) & 0xFF] & "\x10\x10\x10\x10\x10\x10\x10\x10") |
715
-                    ($shuffleip[ $l        & 0xFF] & "\x08\x08\x08\x08\x08\x08\x08\x08") |
716
-                    ($shuffleip[($l >>  8) & 0xFF] & "\x04\x04\x04\x04\x04\x04\x04\x04") |
715
+                    ($shuffleip[$l & 0xFF] & "\x08\x08\x08\x08\x08\x08\x08\x08") |
716
+                    ($shuffleip[($l >> 8) & 0xFF] & "\x04\x04\x04\x04\x04\x04\x04\x04") |
717 717
                     ($shuffleip[($l >> 16) & 0xFF] & "\x02\x02\x02\x02\x02\x02\x02\x02") |
718 718
                     ($shuffleip[($l >> 24) & 0xFF] & "\x01\x01\x01\x01\x01\x01\x01\x01");
719 719
 
@@ -727,14 +727,14 @@  discard block
 block discarded – undo
727 727
                 // start of "the Feistel (F) function" - see the following URL:
728 728
                 // http://en.wikipedia.org/wiki/Image:Data_Encryption_Standard_InfoBox_Diagram.png
729 729
                 // Merge key schedule.
730
-                $b1 = (($r >>  3) & 0x1FFFFFFF) ^ ($r << 29) ^ $keys[++$ki];
731
-                $b2 = (($r >> 31) & 0x00000001) ^ ($r <<  1) ^ $keys[++$ki];
730
+                $b1 = (($r >> 3) & 0x1FFFFFFF) ^ ($r << 29) ^ $keys[++$ki];
731
+                $b2 = (($r >> 31) & 0x00000001) ^ ($r << 1) ^ $keys[++$ki];
732 732
 
733 733
                 // S-box indexing.
734 734
                 $t = $sbox1[($b1 >> 24) & 0x3F] ^ $sbox2[($b2 >> 24) & 0x3F] ^
735 735
                         $sbox3[($b1 >> 16) & 0x3F] ^ $sbox4[($b2 >> 16) & 0x3F] ^
736
-                        $sbox5[($b1 >>  8) & 0x3F] ^ $sbox6[($b2 >>  8) & 0x3F] ^
737
-                        $sbox7[ $b1        & 0x3F] ^ $sbox8[ $b2        & 0x3F] ^ $l;
736
+                        $sbox5[($b1 >> 8) & 0x3F] ^ $sbox6[($b2 >> 8) & 0x3F] ^
737
+                        $sbox7[$b1 & 0x3F] ^ $sbox8[$b2 & 0x3F] ^ $l;
738 738
                 // end of "the Feistel (F) function"
739 739
 
740 740
                 $l = $r;
@@ -752,10 +752,10 @@  discard block
 block discarded – undo
752 752
                 ($shuffleinvip[($l >> 24) & 0xFF] & "\x40\x40\x40\x40\x40\x40\x40\x40") |
753 753
                 ($shuffleinvip[($r >> 16) & 0xFF] & "\x20\x20\x20\x20\x20\x20\x20\x20") |
754 754
                 ($shuffleinvip[($l >> 16) & 0xFF] & "\x10\x10\x10\x10\x10\x10\x10\x10") |
755
-                ($shuffleinvip[($r >>  8) & 0xFF] & "\x08\x08\x08\x08\x08\x08\x08\x08") |
756
-                ($shuffleinvip[($l >>  8) & 0xFF] & "\x04\x04\x04\x04\x04\x04\x04\x04") |
757
-                ($shuffleinvip[ $r        & 0xFF] & "\x02\x02\x02\x02\x02\x02\x02\x02") |
758
-                ($shuffleinvip[ $l        & 0xFF] & "\x01\x01\x01\x01\x01\x01\x01\x01");
755
+                ($shuffleinvip[($r >> 8) & 0xFF] & "\x08\x08\x08\x08\x08\x08\x08\x08") |
756
+                ($shuffleinvip[($l >> 8) & 0xFF] & "\x04\x04\x04\x04\x04\x04\x04\x04") |
757
+                ($shuffleinvip[$r & 0xFF] & "\x02\x02\x02\x02\x02\x02\x02\x02") |
758
+                ($shuffleinvip[$l & 0xFF] & "\x01\x01\x01\x01\x01\x01\x01\x01");
759 759
     }
760 760
 
761 761
     /**
@@ -1229,43 +1229,43 @@  discard block
 block discarded – undo
1229 1229
             // Perform the PC/1 transformation and compute C and D.
1230 1230
             $t = unpack('Nl/Nr', $key);
1231 1231
             list($l, $r) = array($t['l'], $t['r']);
1232
-            $key = ($this->shuffle[$pc1map[ $r        & 0xFF]] & "\x80\x80\x80\x80\x80\x80\x80\x00") |
1233
-                    ($this->shuffle[$pc1map[($r >>  8) & 0xFF]] & "\x40\x40\x40\x40\x40\x40\x40\x00") |
1232
+            $key = ($this->shuffle[$pc1map[$r & 0xFF]] & "\x80\x80\x80\x80\x80\x80\x80\x00") |
1233
+                    ($this->shuffle[$pc1map[($r >> 8) & 0xFF]] & "\x40\x40\x40\x40\x40\x40\x40\x00") |
1234 1234
                     ($this->shuffle[$pc1map[($r >> 16) & 0xFF]] & "\x20\x20\x20\x20\x20\x20\x20\x00") |
1235 1235
                     ($this->shuffle[$pc1map[($r >> 24) & 0xFF]] & "\x10\x10\x10\x10\x10\x10\x10\x00") |
1236
-                    ($this->shuffle[$pc1map[ $l        & 0xFF]] & "\x08\x08\x08\x08\x08\x08\x08\x00") |
1237
-                    ($this->shuffle[$pc1map[($l >>  8) & 0xFF]] & "\x04\x04\x04\x04\x04\x04\x04\x00") |
1236
+                    ($this->shuffle[$pc1map[$l & 0xFF]] & "\x08\x08\x08\x08\x08\x08\x08\x00") |
1237
+                    ($this->shuffle[$pc1map[($l >> 8) & 0xFF]] & "\x04\x04\x04\x04\x04\x04\x04\x00") |
1238 1238
                     ($this->shuffle[$pc1map[($l >> 16) & 0xFF]] & "\x02\x02\x02\x02\x02\x02\x02\x00") |
1239 1239
                     ($this->shuffle[$pc1map[($l >> 24) & 0xFF]] & "\x01\x01\x01\x01\x01\x01\x01\x00");
1240 1240
             $key = unpack('Nc/Nd', $key);
1241
-            $c = ( $key['c'] >> 4) & 0x0FFFFFFF;
1241
+            $c = ($key['c'] >> 4) & 0x0FFFFFFF;
1242 1242
             $d = (($key['d'] >> 4) & 0x0FFFFFF0) | ($key['c'] & 0x0F);
1243 1243
 
1244 1244
             $keys[$des_round] = array(
1245 1245
                 self::ENCRYPT => array(),
1246 1246
                 self::DECRYPT => array_fill(0, 32, 0)
1247 1247
             );
1248
-            for ($i = 0, $ki = 31; $i < 16; ++$i, $ki-= 2) {
1248
+            for ($i = 0, $ki = 31; $i < 16; ++$i, $ki -= 2) {
1249 1249
                 $c <<= $shifts[$i];
1250 1250
                 $c = ($c | ($c >> 28)) & 0x0FFFFFFF;
1251 1251
                 $d <<= $shifts[$i];
1252 1252
                 $d = ($d | ($d >> 28)) & 0x0FFFFFFF;
1253 1253
 
1254 1254
                 // Perform the PC-2 transformation.
1255
-                $cp = $pc2mapc1[ $c >> 24        ] | $pc2mapc2[($c >> 16) & 0xFF] |
1256
-                        $pc2mapc3[($c >>  8) & 0xFF] | $pc2mapc4[ $c        & 0xFF];
1257
-                $dp = $pc2mapd1[ $d >> 24        ] | $pc2mapd2[($d >> 16) & 0xFF] |
1258
-                        $pc2mapd3[($d >>  8) & 0xFF] | $pc2mapd4[ $d        & 0xFF];
1255
+                $cp = $pc2mapc1[$c >> 24] | $pc2mapc2[($c >> 16) & 0xFF] |
1256
+                        $pc2mapc3[($c >> 8) & 0xFF] | $pc2mapc4[$c & 0xFF];
1257
+                $dp = $pc2mapd1[$d >> 24] | $pc2mapd2[($d >> 16) & 0xFF] |
1258
+                        $pc2mapd3[($d >> 8) & 0xFF] | $pc2mapd4[$d & 0xFF];
1259 1259
 
1260 1260
                 // Reorder: odd bytes/even bytes. Push the result in key schedule.
1261
-                $val1 = ( $cp        & 0xFF000000) | (($cp <<  8) & 0x00FF0000) |
1262
-                        (($dp >> 16) & 0x0000FF00) | (($dp >>  8) & 0x000000FF);
1263
-                $val2 = (($cp <<  8) & 0xFF000000) | (($cp << 16) & 0x00FF0000) |
1264
-                        (($dp >>  8) & 0x0000FF00) | ( $dp        & 0x000000FF);
1265
-                $keys[$des_round][self::ENCRYPT][       ] = $val1;
1261
+                $val1 = ($cp & 0xFF000000) | (($cp << 8) & 0x00FF0000) |
1262
+                        (($dp >> 16) & 0x0000FF00) | (($dp >> 8) & 0x000000FF);
1263
+                $val2 = (($cp << 8) & 0xFF000000) | (($cp << 16) & 0x00FF0000) |
1264
+                        (($dp >> 8) & 0x0000FF00) | ($dp & 0x000000FF);
1265
+                $keys[$des_round][self::ENCRYPT][] = $val1;
1266 1266
                 $keys[$des_round][self::DECRYPT][$ki - 1] = $val1;
1267
-                $keys[$des_round][self::ENCRYPT][       ] = $val2;
1268
-                $keys[$des_round][self::DECRYPT][$ki    ] = $val2;
1267
+                $keys[$des_round][self::ENCRYPT][] = $val2;
1268
+                $keys[$des_round][self::DECRYPT][$ki] = $val2;
1269 1269
             }
1270 1270
         }
1271 1271
 
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/Twofish.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -462,8 +462,8 @@  discard block
 block discarded – undo
462 462
             case 16:
463 463
                 list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[1], $le_longs[2]);
464 464
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[3], $le_longs[4]);
465
-                for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
466
-                    $A = $m0[$q0[$q0[$i] ^ $key[ 9]] ^ $key[1]] ^
465
+                for ($i = 0, $j = 1; $i < 40; $i += 2, $j += 2) {
466
+                    $A = $m0[$q0[$q0[$i] ^ $key[9]] ^ $key[1]] ^
467 467
                             $m1[$q0[$q1[$i] ^ $key[10]] ^ $key[2]] ^
468 468
                             $m2[$q1[$q0[$i] ^ $key[11]] ^ $key[3]] ^
469 469
                             $m3[$q1[$q1[$i] ^ $key[12]] ^ $key[4]];
@@ -486,8 +486,8 @@  discard block
 block discarded – undo
486 486
                 list($sb, $sa, $s9, $s8) = $this->_mdsrem($le_longs[1], $le_longs[2]);
487 487
                 list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[3], $le_longs[4]);
488 488
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[5], $le_longs[6]);
489
-                for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
490
-                    $A = $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^
489
+                for ($i = 0, $j = 1; $i < 40; $i += 2, $j += 2) {
490
+                    $A = $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[9]] ^ $key[1]] ^
491 491
                             $m1[$q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
492 492
                             $m2[$q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
493 493
                             $m3[$q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]] ^ $key[4]];
@@ -511,8 +511,8 @@  discard block
 block discarded – undo
511 511
                 list($sb, $sa, $s9, $s8) = $this->_mdsrem($le_longs[3], $le_longs[4]);
512 512
                 list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[5], $le_longs[6]);
513 513
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[7], $le_longs[8]);
514
-                for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
515
-                    $A = $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^
514
+                for ($i = 0, $j = 1; $i < 40; $i += 2, $j += 2) {
515
+                    $A = $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[9]] ^ $key[1]] ^
516 516
                             $m1[$q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
517 517
                             $m2[$q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
518 518
                             $m3[$q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]] ^ $key[4]];
@@ -610,27 +610,27 @@  discard block
 block discarded – undo
610 610
 
611 611
         $ki = 7;
612 612
         while ($ki < 39) {
613
-            $t0 = $S0[ $R0        & 0xff] ^
614
-                    $S1[($R0 >>  8) & 0xff] ^
613
+            $t0 = $S0[$R0 & 0xff] ^
614
+                    $S1[($R0 >> 8) & 0xff] ^
615 615
                     $S2[($R0 >> 16) & 0xff] ^
616 616
                     $S3[($R0 >> 24) & 0xff];
617 617
             $t1 = $S0[($R1 >> 24) & 0xff] ^
618
-                    $S1[ $R1        & 0xff] ^
619
-                    $S2[($R1 >>  8) & 0xff] ^
618
+                    $S1[$R1 & 0xff] ^
619
+                    $S2[($R1 >> 8) & 0xff] ^
620 620
                     $S3[($R1 >> 16) & 0xff];
621
-            $R2^= $t0 + $t1 + $K[++$ki];
621
+            $R2 ^= $t0 + $t1 + $K[++$ki];
622 622
             $R2 = ($R2 >> 1 & 0x7fffffff) | ($R2 << 31);
623 623
             $R3 = ((($R3 >> 31) & 1) | ($R3 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
624 624
 
625
-            $t0 = $S0[ $R2        & 0xff] ^
626
-                    $S1[($R2 >>  8) & 0xff] ^
625
+            $t0 = $S0[$R2 & 0xff] ^
626
+                    $S1[($R2 >> 8) & 0xff] ^
627 627
                     $S2[($R2 >> 16) & 0xff] ^
628 628
                     $S3[($R2 >> 24) & 0xff];
629 629
             $t1 = $S0[($R3 >> 24) & 0xff] ^
630
-                    $S1[ $R3        & 0xff] ^
631
-                    $S2[($R3 >>  8) & 0xff] ^
630
+                    $S1[$R3 & 0xff] ^
631
+                    $S2[($R3 >> 8) & 0xff] ^
632 632
                     $S3[($R3 >> 16) & 0xff];
633
-            $R0^= ($t0 + $t1 + $K[++$ki]);
633
+            $R0 ^= ($t0 + $t1 + $K[++$ki]);
634 634
             $R0 = ($R0 >> 1 & 0x7fffffff) | ($R0 << 31);
635 635
             $R1 = ((($R1 >> 31) & 1) | ($R1 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
636 636
         }
@@ -666,27 +666,27 @@  discard block
 block discarded – undo
666 666
 
667 667
         $ki = 40;
668 668
         while ($ki > 8) {
669
-            $t0 = $S0[$R0       & 0xff] ^
670
-                    $S1[$R0 >>  8 & 0xff] ^
669
+            $t0 = $S0[$R0 & 0xff] ^
670
+                    $S1[$R0 >> 8 & 0xff] ^
671 671
                     $S2[$R0 >> 16 & 0xff] ^
672 672
                     $S3[$R0 >> 24 & 0xff];
673 673
             $t1 = $S0[$R1 >> 24 & 0xff] ^
674
-                    $S1[$R1       & 0xff] ^
675
-                    $S2[$R1 >>  8 & 0xff] ^
674
+                    $S1[$R1 & 0xff] ^
675
+                    $S2[$R1 >> 8 & 0xff] ^
676 676
                     $S3[$R1 >> 16 & 0xff];
677
-            $R3^= $t0 + ($t1 << 1) + $K[--$ki];
677
+            $R3 ^= $t0 + ($t1 << 1) + $K[--$ki];
678 678
             $R3 = $R3 >> 1 & 0x7fffffff | $R3 << 31;
679 679
             $R2 = ($R2 >> 31 & 0x1 | $R2 << 1) ^ ($t0 + $t1 + $K[--$ki]);
680 680
 
681
-            $t0 = $S0[$R2       & 0xff] ^
682
-                    $S1[$R2 >>  8 & 0xff] ^
681
+            $t0 = $S0[$R2 & 0xff] ^
682
+                    $S1[$R2 >> 8 & 0xff] ^
683 683
                     $S2[$R2 >> 16 & 0xff] ^
684 684
                     $S3[$R2 >> 24 & 0xff];
685 685
             $t1 = $S0[$R3 >> 24 & 0xff] ^
686
-                    $S1[$R3       & 0xff] ^
687
-                    $S2[$R3 >>  8 & 0xff] ^
686
+                    $S1[$R3 & 0xff] ^
687
+                    $S2[$R3 >> 8 & 0xff] ^
688 688
                     $S3[$R3 >> 16 & 0xff];
689
-            $R1^= $t0 + ($t1 << 1) + $K[--$ki];
689
+            $R1 ^= $t0 + ($t1 << 1) + $K[--$ki];
690 690
             $R1 = $R1 >> 1 & 0x7fffffff | $R1 << 31;
691 691
             $R0 = ($R0 >> 31 & 0x1 | $R0 << 1) ^ ($t0 + $t1 + $K[--$ki]);
692 692
         }
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/Rijndael.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -371,8 +371,8 @@  discard block
 block discarded – undo
371 371
 
372 372
         // subWord
373 373
         for ($i = 0; $i < $Nb; ++$i) {
374
-            $state[$i] =   $sbox[$state[$i]       & 0x000000FF]        |
375
-                            ($sbox[$state[$i] >>  8 & 0x000000FF] <<  8) |
374
+            $state[$i] = $sbox[$state[$i] & 0x000000FF] |
375
+                            ($sbox[$state[$i] >> 8 & 0x000000FF] << 8) |
376 376
                             ($sbox[$state[$i] >> 16 & 0x000000FF] << 16) |
377 377
                             ($sbox[$state[$i] >> 24 & 0x000000FF] << 24);
378 378
         }
@@ -474,8 +474,8 @@  discard block
 block discarded – undo
474 474
                     ($state[$k] & 0x0000FF00) |
475 475
                     ($state[$l] & 0x000000FF);
476 476
 
477
-            $temp[$i] = $dw[$i] ^ ($isbox[$word       & 0x000000FF]        |
478
-                                    ($isbox[$word >>  8 & 0x000000FF] <<  8) |
477
+            $temp[$i] = $dw[$i] ^ ($isbox[$word & 0x000000FF] |
478
+                                    ($isbox[$word >> 8 & 0x000000FF] << 8) |
479 479
                                     ($isbox[$word >> 16 & 0x000000FF] << 16) |
480 480
                                     ($isbox[$word >> 24 & 0x000000FF] << 24));
481 481
             ++$i;
@@ -621,11 +621,11 @@  discard block
 block discarded – undo
621 621
     {
622 622
         static $sbox;
623 623
         if (empty($sbox)) {
624
-            list(, , , , $sbox) = $this->_getTables();
624
+            list(,,,, $sbox) = $this->_getTables();
625 625
         }
626 626
 
627
-        return  $sbox[$word       & 0x000000FF]        |
628
-                ($sbox[$word >>  8 & 0x000000FF] <<  8) |
627
+        return  $sbox[$word & 0x000000FF] |
628
+                ($sbox[$word >> 8 & 0x000000FF] << 8) |
629 629
                 ($sbox[$word >> 16 & 0x000000FF] << 16) |
630 630
                 ($sbox[$word >> 24 & 0x000000FF] << 24);
631 631
     }
Please login to merge, or discard this patch.