public function open($path, $name) {
    $rand = $this->psl['crypt/rand'];

    /* Set some variables we need later. */
    $this->savePath  = $path;
    $this->name      = $name;
    $this->keyCookie = $name.'_secret';

    /* Set current and new ID. */
    if(isset($_COOKIE[$name])) {
      $this->currID = $_COOKIE[$name];
    } else {
      $this->currID = null;
    }
    if($this->sessIdRegen === true || $this->currID === null) {
      $this->newID = $rand->str(128, 'abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ-_.!*#=%');
    } else {
      $this->newID = $this->currID;
    }

    /* Set cookie with new session ID. */
    $cookieParam = session_get_cookie_params();
    setcookie(
        $name,
        $this->newID,
        $cookieParam['lifetime'],
        $cookieParam['path'],
        $cookieParam['domain'],
        $cookieParam['secure'],
        $cookieParam['httponly']
    );

    /* If we don't have a encryption key, create one. */
    if(!isset($_COOKIE[$this->keyCookie])) {
      /* Create a secret used for encryption of session. */
      $this->setSecret();
    } else {
      $this->secret = base64_decode($_COOKIE[$this->keyCookie]);
    }
    return true;
  }