Skip to content

Validation

  • Full name: \Qubus\Http\Cookies\Validation\Validation

Constants

Constant Visibility Type Value
DEFAULT_ALGO public 'sha256'
NONCE_LENGTH public 32

Properties

key

public string $key

algo

public string $algo

Methods

__construct

public __construct(string $key, ?string $algo = null): mixed

Parameters:

Parameter Type Description
$key string
$algo ?string

extract

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
  • This method is static.

hashCompare

private static hashCompare(mixed $hash1, mixed $hash2): bool
  • This method is static.

Parameters:

Parameter Type Description
$hash1 mixed
$hash2 mixed


Automatically generated on 2025-10-13