/**
  * Return the update process HTML content
  *
  * @return string
  */
 public function main()
 {
     $extConf = $this->getExtConf();
     $this->factory = tx_caretakerinstance_ServiceFactory::getInstance();
     try {
         list($publicKey, $privateKey) = $this->factory->getCryptoManager()->generateKeyPair();
         $extConf['crypto.']['instance.']['publicKey'] = $publicKey;
         $extConf['crypto.']['instance.']['privateKey'] = $privateKey;
         $this->writeExtensionConfiguration($extConf);
         $content = "Success: Generated public / private key";
     } catch (Exception $exception) {
         $content = 'Error: ' . $exception->getMessage();
     }
     return $content;
 }
 /**
  * Return the update process HTML content
  *
  * @return string
  */
 public function main()
 {
     $extConf = $this->getExtConf();
     $this->factory = tx_caretakerinstance_ServiceFactory::getInstance();
     try {
         list($publicKey, $privateKey) = $this->factory->getCryptoManager()->generateKeyPair();
         $extConf['crypto.']['instance.']['publicKey'] = $publicKey;
         $extConf['crypto.']['instance.']['privateKey'] = $privateKey;
         $typo3Version = explode('.', TYPO3_version);
         $majorVersion = intval($typo3Version[0]);
         if ($majorVersion >= 6) {
             $this->writeExtensionConfiguration($extConf);
         } else {
             $this->writeExtConf($extConf);
         }
         $content = "Success: Generated public / private key";
     } catch (Exception $exception) {
         $content = 'Error: ' . $exception->getMessage();
     }
     return $content;
 }