SessionIdGenerator
final class SessionIdGenerator (View source)
Generates and validates canonical identifiers for non-native session storage.
Identifiers contain 32 cryptographically secure random bytes encoded as 64 lowercase hexadecimal characters.
Constants
| private RANDOM_BYTES |
|
| private PATTERN |
|
Methods
generate()
Generates a cryptographically secure canonical session identifier.
string
isValid(string $sessionId)
Reports whether a value has the canonical non-native session identifier format.
bool
Details
generate
string
generate()
Generates a cryptographically secure canonical session identifier.
isValid
bool
isValid(string $sessionId)
Reports whether a value has the canonical non-native session identifier format.