public static function decrypt($value_encoded, $encryption_key = '') { $MY =& MY_Controller::get_instance(); $MY->load->library('library_zend2'); $filter = new \Zend\Filter\Decrypt(); $filter->setKey(empty($encryption_key) ? self::$Encryption_Key : $encryption_key); return $filter->filter($value_encoded); }
private function decrypt_vast_auction_params($encryption_key, $param) { /* * unserialize params for URL using ZF2 encryption */ $decrypted_params = null; try { $filter = new \Zend\Filter\Decrypt(); $filter->setKey($encryption_key); $decrypted_string = $filter->filter($param); $decrypted_params = unserialize($decrypted_string); } catch (Exception $e) { // logging here } return $decrypted_params; }