From 56acb6723cd6f8cddc27e87f41f74afed1137f46 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 19 Mar 2016 12:06:12 -0500 Subject: [PATCH] Tests/BigInteger: add unit test for abhishektaneja's sliding window fix --- tests/Unit/Math/BigInteger/TestCase.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Unit/Math/BigInteger/TestCase.php b/tests/Unit/Math/BigInteger/TestCase.php index b42c0ca6..d5a6b75b 100644 --- a/tests/Unit/Math/BigInteger/TestCase.php +++ b/tests/Unit/Math/BigInteger/TestCase.php @@ -374,4 +374,15 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase $this->assertContains('[value] => 0x32', $str); return $str; } + + /** + * @group github954 + */ + public function testSlidingWindow() + { + $e = $this->getInstance(str_repeat('1', 1794), 2); + $x = $this->getInstance(1); + $n = $this->getInstance(2); + $x->powMod($e, $n); + } }