public function getPrivateKey() { if (!$this->privateKey) { throw new \RuntimeException('No private key available for encryption.'); } return $this->privateKey; }