Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
NonceGenerator Class Reference

Public Member Functions

 __construct (?callable $onNonce)
 
 getNonce (string $name, int $size=32)
 Returns a new or an existing nonce value.
 
 hasNonce (string $name)
 
 __toString ()
 

Protected Member Functions

 _generateNonce (string $name, ?int $value=null)
 

Private Attributes

array $nonces = []
 
 $onNonce
 

Detailed Description

Definition at line 6 of file NonceGenerator.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ?callable  $onNonce)

Definition at line 12 of file NonceGenerator.php.

Member Function Documentation

◆ __toString()

__toString ( )
Returns
string

Definition at line 50 of file NonceGenerator.php.

◆ _generateNonce()

_generateNonce ( string  $name,
?int  $value = null 
)
protected

Definition at line 16 of file NonceGenerator.php.

◆ getNonce()

getNonce ( string  $name,
int  $size = 32 
)

Returns a new or an existing nonce value.

Parameters
string$name
int$size
Returns
string

Definition at line 33 of file NonceGenerator.php.

◆ hasNonce()

hasNonce ( string  $name)
Parameters
string$name
Returns
bool

Definition at line 42 of file NonceGenerator.php.

Field Documentation

◆ $nonces

array $nonces = []
private

Definition at line 8 of file NonceGenerator.php.

◆ $onNonce

$onNonce
private

Definition at line 10 of file NonceGenerator.php.


The documentation for this class was generated from the following file: