mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-14 10:53:09 +00:00
Merge branch '3.0'
This commit is contained in:
commit
3521f74b4e
@ -305,7 +305,7 @@ class BCMath extends Engine
|
|||||||
*/
|
*/
|
||||||
public function bitwise_or(BCMath $x): BCMath
|
public function bitwise_or(BCMath $x): BCMath
|
||||||
{
|
{
|
||||||
return $this->bitwiseXorHelper($x);
|
return $this->bitwiseOrHelper($x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -223,6 +223,12 @@ abstract class TestCase extends PhpseclibTestCase
|
|||||||
|
|
||||||
$this->assertSame($z->toHex(), $x->bitwise_OR($y)->toHex());
|
$this->assertSame($z->toHex(), $x->bitwise_OR($y)->toHex());
|
||||||
|
|
||||||
|
$x = $this->getInstance('AFAFAFAFAFAFAFAFAFAFAFAF', 16);
|
||||||
|
$y = $this->getInstance('133713371337133713371337', 16);
|
||||||
|
$z = $this->getInstance('BFBFBFBFBFBFBFBFBFBFBFBF', 16);
|
||||||
|
|
||||||
|
$this->assertSame($z->toHex(), $x->bitwise_OR($y)->toHex());
|
||||||
|
|
||||||
$x = -0xFFFF;
|
$x = -0xFFFF;
|
||||||
$y = 2;
|
$y = 2;
|
||||||
$z = $x ^ $y;
|
$z = $x ^ $y;
|
||||||
|
Loading…
Reference in New Issue
Block a user