mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-02 09:38:06 +01: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