UriSafeTokenGenerator
in package
implements
TokenGeneratorInterface
Generates CSRF tokens.
Tags
Table of Contents
Interfaces
- TokenGeneratorInterface
- Generates CSRF tokens.
Properties
- $entropy : int
Methods
- __construct() : mixed
- Generates URI-safe CSRF tokens.
- generateToken() : string
- Generates a CSRF token.
Properties
$entropy
private
int
$entropy
Methods
__construct()
Generates URI-safe CSRF tokens.
public
__construct([int $entropy = 256 ]) : mixed
Parameters
- $entropy : int = 256
-
The amount of entropy collected for each token (in bits)
generateToken()
Generates a CSRF token.
public
generateToken() : string