Example #1
0
 public function serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
 {
     $sub = new \fpoirotte\Pssht\Wire\Encoder(new \fpoirotte\Pssht\Buffer());
     $this->K_S->serialize($sub);
     $encoder->encodeString($sub->getBuffer()->get(0));
     $encoder->encodeMpint($this->f);
     $sub->encodeString($this->K_S->getName());
     $sub->encodeString($this->K_S->sign($this->H));
     $encoder->encodeString($sub->getBuffer()->get(0));
     return $this;
 }
Example #2
0
 public function serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
 {
     $encoder->encodeMpint($this->e);
     return $this;
 }