Skip to content

Kirby 6.0.0

Str::random()

Generates a random string that may be used for cryptographic purposes

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

Parameters

Name Type Default Description
$length intornull null
$type string 'alphaNum' Pool type (type of allowed characters)

Return types

stringorfalse

Parent class

Kirby\Toolkit\Str