public function testGmp() { if (!extension_loaded('gmp')) { try { dl('gmp.so'); } catch (BaseException $e) { return $this->markTestSkipped('gmp module not available'); } } $this->runDiffieHellmanGeneration(GmpBigIntegerFactory::me()); $this->runDiffieHellmanExchange(GmpBigIntegerFactory::me(), MtRandomSource::me()); if (file_exists('/dev/urandom') && is_readable('/dev/urandom')) { $this->runDiffieHellmanExchange(GmpBigIntegerFactory::me(), new FileRandomSource('/dev/urandom')); } }
/** * @return GmpBigIntegerFactory **/ public static function getFactory() { return GmpBigIntegerFactory::me(); }