Example #1
0
 /**
  * @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;
 }
Example #4
0
 /**
  * @return NamedTree
  **/
 public function setParent(NamedTree $parent)
 {
     Assert::brothers($this, $parent);
     $this->parent = $parent;
     return $this;
 }