Elgg
Version 6.1
|
Provides a factory for HMAC objects. More...
Public Member Functions | |
__construct (protected SiteSecret $site_secret, protected Crypto $crypto) | |
Constructor. More... | |
getHmac ($data, $algo= 'sha256', $key= '') | |
Get an HMAC token builder/validator object. More... | |
generateInviteCode (string $username) | |
Generates a unique invite code for a user. More... | |
validateInviteCode (string $username, string $code) | |
Validate a user's invite code. More... | |
Provides a factory for HMAC objects.
Definition at line 10 of file HmacFactory.php.
Elgg\Security\HmacFactory::__construct | ( | protected SiteSecret | $site_secret, |
protected Crypto | $crypto | ||
) |
Constructor.
SiteSecret | $site_secret | Site secret |
Crypto | $crypto | Elgg crypto service |
Definition at line 20 of file HmacFactory.php.
Elgg\Security\HmacFactory::generateInviteCode | ( | string | $username | ) |
Generates a unique invite code for a user.
string | $username | The username of the user sending the invitation |
Definition at line 49 of file HmacFactory.php.
Elgg\Security\HmacFactory::getHmac | ( | $data, | |
$algo = 'sha256' , |
|||
$key = '' |
|||
) |
Get an HMAC token builder/validator object.
mixed | $data | HMAC data or serializable data |
string | $algo | Hash algorithm |
string | $key | Optional key (default uses site secret) |
Definition at line 32 of file HmacFactory.php.
Elgg\Security\HmacFactory::validateInviteCode | ( | string | $username, |
string | $code | ||
) |
Validate a user's invite code.
string | $username | The username |
string | $code | The invite code |
Definition at line 66 of file HmacFactory.php.