mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-18 03:05:11 +00:00
Tests/BigInteger: add unit test for randomPrime
This commit is contained in:
parent
ce92283c10
commit
a59d046c9d
@ -400,4 +400,11 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
|
||||
$this->assertSame((string) $min, (string) $class::min($min, $max));
|
||||
$this->assertSame((string) $min, (string) $class::min($max, $min));
|
||||
}
|
||||
|
||||
public function testRandomPrime()
|
||||
{
|
||||
$class = static::getStaticClass();
|
||||
$prime = $class::randomPrime(128);
|
||||
$this->assertSame(128, $prime->getLength());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user