Skip to content

Str::random()

Generates a random string that may be used for cryptographic purposes

Str::random(int $length = null, string $type = 'alphaNum'): string

Parameters

Name Type Default Description
$length int null The length of the random string
$type string 'alphaNum' Pool type (type of allowed characters)

Return type

string

Parent class

Kirby\Toolkit\Str