ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
Factory.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
37 class Factory
38 {
39  private array $known_salts = [];
40 
41  public function __construct()
42  {
43  // TODO: load known salts from artifact
44  }
45 
46  public function create(string $salt): Salt
47  {
48  if (!in_array($salt, $this->known_salts, true)) {
49  // throw new \InvalidArgumentException('Unknown salt'); // currently disabled because of missing artifact
50  }
51 
52  return new Salt($salt);
53  }
54 }
The salt is combined with the secret key to derive a unique key for distinguishing different contexts...
Definition: Factory.php:37
The salt is combined with the secret key to derive a unique key for distinguishing different contexts...
Definition: Salt.php:37