mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-27 19:54:57 +00:00
Blowfish: CS adjustments (" -> ')
This commit is contained in:
parent
5bcb298af7
commit
9bcd851e97
@ -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]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user