Example #1
0
 /**
  * {@inheritDoc}
  * @see \Mdanter\Ecc\CurveFpInterface::cmp()
  */
 public function cmp(CurveFpInterface $other)
 {
     $math = $this->adapter;
     $equal = $math->cmp($this->a, $other->getA()) == 0;
     $equal &= $math->cmp($this->b, $other->getB()) == 0;
     $equal &= $math->cmp($this->prime, $other->getPrime()) == 0;
     return $equal ? 0 : 1;
 }