protected function execute(InputInterface $input, OutputInterface $output)
 {
     $encryptor = new AesEncryptor($this->getContainer()->getParameter("provisioning_api.key"));
     // 256 bit key
     $encryptedMessage = base64_encode($encryptor->encrypt($input->getArgument("text")));
     $output->writeln($encryptedMessage);
 }
Exemple #2
0
 /**
  * @param $data string data to encrypt
  * @return string encrypted data
  * @deprecated
  */
 public function encrypt($data)
 {
     return base64_encode($this->encryptor->encrypt($data));
 }