Function __global->get_secure_random_string
Definitions
sources/crypt.php
- Generate a cryptographically secure pseudo-random string suitable for tokens, salts, etc.Do not use for passwords; use get_secure_random_password() instead.
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: string
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$string_length | integer | 13 | N/A | N/A | The length of the string |
$character_map | string | 23456789abcdefghijkmnpqrstuvwxyz | N/A | N/A | A CRYPT_* constant defining the character map to use; the string length should be a power of 2 |
Return
- The pseudo-random string
- Type: string
- Set: N/A
- Range: N/A