Example #1
0
 /**
  * @return void
  */
 public function sanitizeOutput()
 {
     $encrypt_cookie_list = $this->security_config->get('encrypt_cookie_list');
     foreach ($this->cookie_output as $name => $value) {
         if (in_array($name, $encrypt_cookie_list)) {
             $this->cookie_output->set($name, $this->simple_encrypt->encrypt($value));
         }
     }
 }
Example #2
0
 /**
  * @return void
  */
 public function sanitizeOutput()
 {
     $csrf_token = md5(uniqid(rand(), true));
     $this->html_output->setForm($this->security_config->get('csrf_form_name'), $this->simple_encrypt->encrypt($csrf_token));
     $this->cookie_output->set($this->security_config->get('csrf_cookie_name'), $csrf_token, 0);
 }