public function setSecret() {
    $rand = $this->psl['crypt/rand'];

    $this->secret = $rand->bytes(32);
    $cookieParam = session_get_cookie_params();
    setcookie(
        $this->keyCookie,
        base64_encode($this->secret),
        $cookieParam['lifetime'],
        $cookieParam['path'],
        $cookieParam['domain'],
        $cookieParam['secure'],
        $cookieParam['httponly']
    );
    return true;
  }