diff --git a/phpseclib/Crypt/Blowfish.php b/phpseclib/Crypt/Blowfish.php index c3c9cb10..a0d320ec 100644 --- a/phpseclib/Crypt/Blowfish.php +++ b/phpseclib/Crypt/Blowfish.php @@ -411,14 +411,14 @@ class Blowfish extends BlockCipher */ protected function encryptBlock($in) { - $p = $this->bctx["p"]; - // extract($this->bctx["sb"], EXTR_PREFIX_ALL, "sb"); // slower - $sb_0 = $this->bctx["sb"][0]; - $sb_1 = $this->bctx["sb"][1]; - $sb_2 = $this->bctx["sb"][2]; - $sb_3 = $this->bctx["sb"][3]; + $p = $this->bctx['p']; + // extract($this->bctx['sb'], EXTR_PREFIX_ALL, 'sb'); // slower + $sb_0 = $this->bctx['sb'][0]; + $sb_1 = $this->bctx['sb'][1]; + $sb_2 = $this->bctx['sb'][2]; + $sb_3 = $this->bctx['sb'][3]; - $in = unpack("N*", $in); + $in = unpack('N*', $in); $l = $in[1]; $r = $in[2]; @@ -433,7 +433,7 @@ class Blowfish extends BlockCipher $sb_2[$r >> 8 & 0xff]) + $sb_3[$r & 0xff]); } - return pack("N*", $r ^ $p[17], $l ^ $p[16]); + return pack('N*', $r ^ $p[17], $l ^ $p[16]); } /** @@ -445,13 +445,13 @@ class Blowfish extends BlockCipher */ protected function decryptBlock($in) { - $p = $this->bctx["p"]; - $sb_0 = $this->bctx["sb"][0]; - $sb_1 = $this->bctx["sb"][1]; - $sb_2 = $this->bctx["sb"][2]; - $sb_3 = $this->bctx["sb"][3]; + $p = $this->bctx['p']; + $sb_0 = $this->bctx['sb'][0]; + $sb_1 = $this->bctx['sb'][1]; + $sb_2 = $this->bctx['sb'][2]; + $sb_3 = $this->bctx['sb'][3]; - $in = unpack("N*", $in); + $in = unpack('N*', $in); $l = $in[1]; $r = $in[2]; @@ -466,7 +466,7 @@ class Blowfish extends BlockCipher $sb_2[$r >> 8 & 0xff]) + $sb_3[$r & 0xff]); } - return pack("N*", $r ^ $p[0], $l ^ $p[1]); + return pack('N*', $r ^ $p[0], $l ^ $p[1]); } /**