0 follower

Final Class Yiisoft\Csrf\Synchronizer\Generator\RandomCsrfTokenGenerator

InheritanceYiisoft\Csrf\Synchronizer\Generator\RandomCsrfTokenGenerator
ImplementsYiisoft\Csrf\Synchronizer\Generator\CsrfTokenGeneratorInterface

Generates a random token.

Method Details

Hide inherited methods

__construct() public method

public mixed __construct ( integer $length 32 )
$length integer

                public function __construct(int $length = 32)
{
    $this->length = $length;
}

            
generate() public method

public string generate ( )

                public function generate(): string
{
    return Random::string($this->length);
}