| Methods |
public
|
__construct(string $secret, string $algorithm = 'sha256')
|
#
|
public
static
|
generate(): self
A signing key drawn from the system's random source, for a server that mints no state
beyond the lifetime of its own process.
A signing key drawn from the system's random source, for a server that mints no state
beyond the lifetime of its own process.
|
#
|
public
|
sign(string $payload, string $binding = ''): string
Mints a state, bound to $binding when one is given. Pass whatever identifies the caller entitled to resume: an unbound state is replayable by any caller.
Mints a state, bound to $binding when one is given. Pass whatever identifies the caller entitled to resume: an unbound state is replayable by any caller.
|
#
|
public
|
verify(string $state, string $binding = ''): ?string
The payload a state carries, or null when its signature does not hold, meaning this server did
not mint it or minted it for a different $binding.
The payload a state carries, or null when its signature does not hold, meaning this server did
not mint it or minted it for a different $binding.
|
#
|