return $json->{$this->config->tokenName} ?? null;
}
return null;
}
/**
* Returns the CSRF Token.
*/
public function getHash(): ?string
{
return $this->config->tokenRandomize ? $this->randomize($this->hash) : $this->hash;
}
/**
* Randomize hash to avoid BREACH attacks.
*
* @params string $hash CSRF hash
*
* @return string CSRF token
*/
protected function randomize(string $hash): string
{