/** * @param MathAdapterInterface $adapter * @param CurveFpInterface $curve * @param int|string $x * @param int|string $y * @param null $order * @param RandomNumberGeneratorInterface $generator */ public function __construct(MathAdapterInterface $adapter, CurveFpInterface $curve, $x, $y, $order = null, RandomNumberGeneratorInterface $generator = null) { $this->generator = $generator ?: RandomGeneratorFactory::getRandomGenerator(); parent::__construct($adapter, $curve, $x, $y, $order); }
/** * Take X, Y, and a generator point, and we can get what we need! * * @param Math $math * @param GeneratorPoint $generator * @param int|string $x * @param int|string $y */ public function __construct(Math $math, GeneratorPoint $generator, $x, $y) { parent::__construct($math, $generator->getCurve(), $x, $y, $generator->getOrder()); }