Provides a factory for HMAC objects.
More...
Provides a factory for HMAC objects.
Definition at line 10 of file HmacFactory.php.
Elgg\Security\HmacFactory::generateInviteCode |
( |
string |
$username | ) |
|
Generates a unique invite code for a user.
- Parameters
-
string | $username | The username of the user sending the invitation |
- Returns
- string Invite code
- See also
- self::validateInviteCode()
- Since
- 5.0
Definition at line 61 of file HmacFactory.php.
Elgg\Security\HmacFactory::getHmac |
( |
|
$data, |
|
|
|
$algo = 'sha256' , |
|
|
|
$key = '' |
|
) |
| |
Get an HMAC token builder/validator object.
- Parameters
-
mixed | $data | HMAC data or serializable data |
string | $algo | Hash algorithm |
string | $key | Optional key (default uses site secret) |
- Returns
- Hmac
Definition at line 44 of file HmacFactory.php.
Elgg\Security\HmacFactory::validateInviteCode |
( |
string |
$username, |
|
|
string |
$code |
|
) |
| |
Validate a user's invite code.
- Parameters
-
string | $username | The username |
string | $code | The invite code |
- Returns
- bool
- See also
- self::generateInviteCode()
- Since
- 5.0
Definition at line 78 of file HmacFactory.php.
Elgg\Security\HmacFactory::$crypto |
|
protected |
Elgg\Security\HmacFactory::$site_secret |
|
protected |
The documentation for this class was generated from the following file: