generate() public method

Generate a private key
public generate ( ) : string
return string
Beispiel #1
0
 /**
  * Ask the user for a private key (or generate one if user does not specify)
  *
  * @param  InputInterface  $input
  * @param  OutputInterface $output
  * @return string
  */
 private function askForPrivateKey(InputInterface $input, OutputInterface $output)
 {
     $privateKeyGenerator = new GeneratePrivateKey();
     $question = new Question('What do you want the private key to be (leave blank to generate)', $privateKeyGenerator->generate());
     return $this->getHelper('question')->ask($input, $output, $question);
 }