mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
CS: Fix "PEAR.Functions.FunctionCallSignature.Indent" sniff.
This commit is contained in:
parent
b90deb5e83
commit
c0bdf1bd90
@ -27,7 +27,6 @@
|
|||||||
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeTags" />
|
<exclude name="PEAR.Commenting.FunctionComment.SpacingBeforeTags" />
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
|
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
|
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.Indent" />
|
|
||||||
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
<exclude name="PEAR.Functions.FunctionCallSignature.SpaceAfterOpenBracket" />
|
||||||
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.BreakIdent" />
|
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.BreakIdent" />
|
||||||
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.Indent" />
|
<exclude name="PEAR.WhiteSpace.ScopeClosingBrace.Indent" />
|
||||||
|
@ -289,7 +289,11 @@ class Crypt_TripleDES extends Crypt_DES
|
|||||||
if ($this->mode_3cbc && strlen($this->key) > 8) {
|
if ($this->mode_3cbc && strlen($this->key) > 8) {
|
||||||
return $this->des[2]->encrypt(
|
return $this->des[2]->encrypt(
|
||||||
$this->des[1]->decrypt(
|
$this->des[1]->decrypt(
|
||||||
$this->des[0]->encrypt($this->_pad($plaintext))));
|
$this->des[0]->encrypt(
|
||||||
|
$this->_pad($plaintext)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::encrypt($plaintext);
|
return parent::encrypt($plaintext);
|
||||||
@ -306,9 +310,15 @@ class Crypt_TripleDES extends Crypt_DES
|
|||||||
function decrypt($ciphertext)
|
function decrypt($ciphertext)
|
||||||
{
|
{
|
||||||
if ($this->mode_3cbc && strlen($this->key) > 8) {
|
if ($this->mode_3cbc && strlen($this->key) > 8) {
|
||||||
return $this->_unpad($this->des[0]->decrypt(
|
return $this->_unpad(
|
||||||
|
$this->des[0]->decrypt(
|
||||||
$this->des[1]->encrypt(
|
$this->des[1]->encrypt(
|
||||||
$this->des[2]->decrypt(str_pad($ciphertext, (strlen($ciphertext) + 7) & 0xFFFFFFF8, "\0")))));
|
$this->des[2]->decrypt(
|
||||||
|
str_pad($ciphertext, (strlen($ciphertext) + 7) & 0xFFFFFFF8, "\0")
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::decrypt($ciphertext);
|
return parent::decrypt($ciphertext);
|
||||||
|
@ -707,10 +707,12 @@ class Crypt_Twofish extends Crypt_Base
|
|||||||
$R1 = ((($R1 >> 31) & 1) | ($R1 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
|
$R1 = ((($R1 >> 31) & 1) | ($R1 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
return pack("V4", $K[4] ^ $R2,
|
return pack("V4", $K[4] ^ $R2,
|
||||||
$K[5] ^ $R3,
|
$K[5] ^ $R3,
|
||||||
$K[6] ^ $R0,
|
$K[6] ^ $R0,
|
||||||
$K[7] ^ $R1);
|
$K[7] ^ $R1);
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -761,10 +763,12 @@ class Crypt_Twofish extends Crypt_Base
|
|||||||
$R0 = ($R0 >> 31 & 0x1 | $R0 << 1) ^ ($t0 + $t1 + $K[--$ki]);
|
$R0 = ($R0 >> 31 & 0x1 | $R0 << 1) ^ ($t0 + $t1 + $K[--$ki]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @codingStandardsIgnoreStart
|
||||||
return pack("V4", $K[0] ^ $R2,
|
return pack("V4", $K[0] ^ $R2,
|
||||||
$K[1] ^ $R3,
|
$K[1] ^ $R3,
|
||||||
$K[2] ^ $R0,
|
$K[2] ^ $R0,
|
||||||
$K[3] ^ $R1);
|
$K[3] ^ $R1);
|
||||||
|
// @codingStandardsIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user