public function beforeSave() { $crypt = new EncryptionClass(); if ($this->get('input_type') == 'password') { $this->set('value', $crypt->encrypt($this->app->config('globalSalt'), $this->get('value'))); } }
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'))); }