ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Factory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
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:38
The salt is combined with the secret key to derive a unique key for distinguishing different contexts...
Definition: Salt.php:38