Documentation

Hmac
in package
implements Signer

Table of Contents

Interfaces

Signer

Properties

$secret  : string
The secret key.

Methods

__construct()  : void
Creates a new signer instance.
sign()  : array<string|int, mixed>
Sign the given serializable.
verify()  : bool
Verify the given signature.

Properties

$secret

The secret key.

protected string $secret

Methods

__construct()

Creates a new signer instance.

public __construct(string $secret) : void
Parameters
$secret : string

sign()

Sign the given serializable.

public sign(string $serialized) : array<string|int, mixed>
Parameters
$serialized : string
Return values
array<string|int, mixed>

verify()

Verify the given signature.

public verify(array<string|int, mixed> $signature) : bool
Parameters
$signature : array<string|int, mixed>
Return values
bool

        
On this page

Search results