Elgg  Version 4.3
Public Member Functions | List of all members
Elgg\Security\HmacFactory Class Reference

Provides a factory for HMAC objects. More...

Public Member Functions

 __construct (SiteSecret $secret, Crypto $crypto)
 Constructor. More...
 
 getHmac ($data, $algo= 'sha256', $key= '')
 Get an HMAC token builder/validator object. More...
 

Detailed Description

Provides a factory for HMAC objects.

Definition at line 9 of file HmacFactory.php.

Constructor & Destructor Documentation

Elgg\Security\HmacFactory::__construct ( SiteSecret  $secret,
Crypto  $crypto 
)

Constructor.

Parameters
SiteSecret$secretSite secret
Crypto$cryptoElgg crypto service

Definition at line 27 of file HmacFactory.php.

Member Function Documentation

Elgg\Security\HmacFactory::getHmac (   $data,
  $algo = 'sha256',
  $key = '' 
)

Get an HMAC token builder/validator object.

Parameters
mixed$dataHMAC data or serializable data
string$algoHash algorithm
string$keyOptional key (default uses site secret)
Returns
Hmac

Definition at line 41 of file HmacFactory.php.


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