Validation
- Full name:
\Qubus\Http\Cookies\Validation\Validation
Constants
| Constant | Visibility | Type | Value |
DEFAULT_ALGO | public | | 'sha256' |
NONCE_LENGTH | public | | 32 |
Properties
key
algo
Methods
__construct
public __construct(string $key, ?string $algo = null): mixed
Parameters:
| Parameter | Type | Description |
$key | string | |
$algo | ?string | |
public extract(mixed $value): string
Parameters:
| Parameter | Type | Description |
$value | mixed | |
sign
public sign(mixed $value): string|false
Parameters:
| Parameter | Type | Description |
$value | mixed | |
verify
private verify(\Qubus\Http\Cookies\Validation\Message $message): bool
Parameters:
| Parameter | Type | Description |
$message | \Qubus\Http\Cookies\Validation\Message | |
generateNonce
private static generateNonce(): string
hashCompare
private static hashCompare(mixed $hash1, mixed $hash2): bool
- This method is static. Parameters:
| Parameter | Type | Description |
$hash1 | mixed | |
$hash2 | mixed | |