Elgg  Version 3.0
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, ElggCrypto $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 10 of file HmacFactory.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
SiteSecret$secretSite secret
ElggCrypto$cryptoElgg crypto service

Definition at line 28 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 42 of file HmacFactory.php.


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