public function getPublicKey() { if (($publicKey = $this->getViewState('PublicKey', '')) === '') { $publicKey = $this->generateRandomKey(); $this->setPublicKey($publicKey); } return $publicKey; }