/** * @return IdentifiableTree **/ public function setParent(IdentifiableTree $parent) { Assert::brothers($this, $parent); $this->parent = $parent; return $this; }
/** * @return BigInteger **/ public function makeSharedKey(BigInteger $otherSitePublic) { Assert::brothers($this->private, $otherSitePublic); return $otherSitePublic->modPow($this->private, $this->parameters->getModulus()); }
public function __construct(BigInteger $gen, BigInteger $modulus) { Assert::brothers($gen, $modulus); $this->gen = $gen; $this->modulus = $modulus; }
/** * @return NamedTree **/ public function setParent(NamedTree $parent) { Assert::brothers($this, $parent); $this->parent = $parent; return $this; }