Ejemplo n.º 1
0
 /**
  * Set command line options for password encryption
  *
  * @param \phpbu\App\Cli\Cmd $cmd
  */
 protected function setPasswordOptions(Cmd $cmd)
 {
     $password = '******' . $this->password;
     $cmd->addOption('enc');
     $cmd->addOption('-e');
     $cmd->addOptionIfNotEmpty('-a', $this->base64, false);
     $cmd->addOption('-' . $this->algorithm);
     $cmd->addOption('-pass', $password, ' ');
     $cmd->addOption('-in', $this->sourceFile, ' ');
     $cmd->addOption('-out', $this->targetFile, ' ');
 }
Ejemplo n.º 2
0
 /**
  * Set the openssl command line options
  *
  * @param \phpbu\App\Cli\Cmd $cmd
  */
 protected function setOptions(Cmd $cmd)
 {
     $cmd->addOptionIfNotEmpty('-h', $this->host, true, ' ');
     $cmd->addOptionIfNotEmpty('-p', $this->port, true, ' ');
     $cmd->addOptionIfNotEmpty('-a', $this->password, true, ' ');
 }