mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-25 11:20:03 +00:00
CS adjustments
This commit is contained in:
parent
a015cded00
commit
6ad7c53bbf
@ -433,7 +433,7 @@ class Blowfish extends BlockCipher
|
||||
$this->bctx['p'][$i ] = $l;
|
||||
$this->bctx['p'][$i + 1] = $r;
|
||||
}
|
||||
for ($i = 0; $i < 0x400; $i+= 0x100) {
|
||||
for ($i = 0; $i < 0x400; $i += 0x100) {
|
||||
for ($j = 0; $j < 256; $j += 2) {
|
||||
list($l, $r) = array_values(unpack('N*', $data = $this->encryptBlock($data)));
|
||||
$this->bctx['sb'][$i | $j] = $l;
|
||||
|
@ -266,11 +266,13 @@ final class PrivateKey extends EC implements Common\PrivateKey
|
||||
$temp = new \ReflectionMethod($format, 'save');
|
||||
$paramCount = $temp->getNumberOfRequiredParameters();
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
switch ($paramCount) {
|
||||
case 2: return $format::save($r, $s);
|
||||
case 3: return $format::save($r, $s, $this->getCurve());
|
||||
case 4: return $format::save($r, $s, $this->getCurve(), $this->getLength());
|
||||
}
|
||||
// @codingStandardsIgnoreEnd
|
||||
|
||||
// presumably the only way you could get to this is if you were using a custom plugin
|
||||
throw new UnsupportedOperationException("$format::save() has $paramCount parameters - the only valid parameter counts are 2 or 3");
|
||||
|
@ -4490,7 +4490,8 @@ class SSH2
|
||||
*/
|
||||
protected function send_channel_packet($client_channel, $data)
|
||||
{
|
||||
if (isset($this->channel_buffers_write[$client_channel])
|
||||
if (
|
||||
isset($this->channel_buffers_write[$client_channel])
|
||||
&& strpos($data, $this->channel_buffers_write[$client_channel]) === 0
|
||||
) {
|
||||
// if buffer holds identical initial data content, resume send from the unmatched data portion
|
||||
|
@ -15,7 +15,9 @@ class RandomTest extends PhpseclibTestCase
|
||||
{
|
||||
public static function stringLengthData()
|
||||
{
|
||||
return array_map(function($x) { return [$x]; }, [
|
||||
return array_map(function ($x) {
|
||||
return [$x];
|
||||
}, [
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 17, 19, 20, 23, 29, 31, 37,
|
||||
41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 111, 128, 1000,
|
||||
1024, 10000, 12345, 100000, 123456
|
||||
|
Loading…
Reference in New Issue
Block a user