decode() public method

Reverses the above process
public decode ( $string, $key = '' ) : string
return string
コード例 #1
0
ファイル: integration.php プロジェクト: Calit2-UCI/IoT_Map
 private function _session_read()
 {
     if (empty($this->_session)) {
         $config = get_config();
         $session = filter_input(INPUT_COOKIE, $config['sess_cookie_name']);
         require_once BASEPATH . 'libraries/Encrypt.php';
         $encrypt = new CI_Encrypt();
         $this->_session = unserialize($encrypt->decode($session, $config['encryption_key']));
     }
     return $this->_session;
 }
コード例 #2
0
ファイル: MY_Encrypt.php プロジェクト: NustechPvtLtd/webzero
 function decode($string, $key = "")
 {
     $string = strtr($string, array('.' => '+', '_' => '=', '~' => '/'));
     return parent::decode($string, $key);
 }