Skip to content

Kirby 4.4.1

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