29 $this->site_secret = $secret;
30 $this->crypto = $crypto;
44 $key = $this->site_secret->get(
true);
46 return new Hmac(
$key, [$this->crypto,
'areEqual'],
$data, $algo);
Manages a site-specific secret key, encoded as a 32 byte string "secret".
if(elgg_trigger_plugin_hook('usersettings:save', 'user', $hooks_params, true)) foreach($request->validation() ->all() as $item) $data
getHmac($data, $algo= 'sha256', $key= '')
Get an HMAC token builder/validator object.
Component for creating HMAC tokens.
__construct(SiteSecret $secret, ElggCrypto $crypto)
Constructor.
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
Provides a factory for HMAC objects.