예제 #1
0
 public function beforeSave()
 {
     $crypt = new EncryptionClass();
     if ($this->get('input_type') == 'password') {
         $this->set('value', $crypt->encrypt($this->app->config('globalSalt'), $this->get('value')));
     }
 }
예제 #2
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $salt = $input->getOption('salt');
     $adjustments = $input->getOption('adjust');
     $modulus = $input->getOption('modulus');
     $crypt = new EncryptionClass();
     $crypt->setAdjustment($adjustments);
     // 1st adjustment value (optional)
     $crypt->setModulus($modulus);
     // 2nd adjustment value (optional)
     $output->writeln($crypt->encrypt($salt, $input->getArgument('password')));
 }