public function setPrivateKey(PrivateKey $privateKey) { $this->privateKey = $privateKey; return $this; }
/** * @return PublicKey */ public function getPublicKey() { if (null === $this->publicKey) { $this->publicKey = new PublicKey(); $this->publicKey->setPrivateKey($this); $this->publicKey->generate(); } return $this->publicKey; }