ILIAS  trunk Revision v12.0_alpha-399-g579a087ced2
HMACSigningKeyGenerator.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
26
33{
34 public function __construct(
35 private Algorithm $algorithm
36 ) {
37 }
38
39 public function generate(SecretKey $secret_key, Salt $salt): SigningKey
40 {
41 return new SigningKey(hash_hmac($this->algorithm->getName(), $salt->get(), $secret_key->get(), false));
42 }
43}
Signatures are secured by the secret_key.
Definition: SecretKey.php:40
The salt is combined with the secret key to derive a unique key for distinguishing different contexts...
Definition: Salt.php:38