public function read($id) {
    $crypto = $this->psl['crypt/crypto'];
    $store  = $this->psl['store'];

    /* If no cookie is set, just drop it! */
    if(!isset($_COOKIE[$this->name])) {
      return false;
    }

    /* Read from store and decrypt. */
    try {
      $sessData = $store->read('session', $_COOKIE[$this->name]);

      if($sessData !== false ) {
        $return = $crypto->decrypt($sessData, $this->secret);
      } else {
        $return = false;
      }
      return $return;
    }  catch (\phpSec\Exception $e) {
      return false;
    }
  }
public function read($id) {
    $crypto = $this->psl['crypt/crypto'];
    $store  = $this->psl['store'];

    /* If no cookie is set, just drop it! */
    if(!isset($_COOKIE[$this->name])) {
      return false;
    }

    /* Read from store and decrypt. */
    try {
      $sessData = $store->read('session', $_COOKIE[$this->name]);

      if($sessData !== false ) {
        $return = $crypto->decrypt($sessData, $this->secret);
      } else {
        $return = false;
      }
      return $return;
    }  catch (\phpSec\Exception $e) {
      return false;
    }
  }
public function read ( $ id ) { $ crypto = $ this -> psl [ 'crypt/crypto' ] ; $ store = $ this -> psl [ 'store' ] ; /* If no cookie is set, just drop it! */ if ( ! isset ( $ _COOKIE [ $ this -> name ] ) ) { return false ; } /* Read from store and decrypt. */ try { $ sessData = $ store -> read ( 'session' , $ _COOKIE [ $ this -> name ] ) ; if ( $ sessData !== false ) { $ return = $ crypto -> decrypt ( $ sessData , $ this -> secret ) ; } else { $ return = false ; } return $ return ; } catch ( \ phpSec \ Exception $ e ) { return false ; } }
Read and decrypt a session.

@param string $id
@return mixed
Read and decrypt a session .