Skip to content

Kirby 4.1.2

Str::random()

Generates a random string that may be used for cryptographic purposes

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

Parameters

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

Return type

string|false

Parent class

Kirby\Toolkit\Str