add($algorithm->name(), $algorithm); } } /** * Adds an algorithm. * * Each algorithm is identified by an alias hence it is allowed to have the same algorithm twice (or more). This can * be helpful when an algorithm have several configuration options. */ public function add(string $alias, Algorithm $algorithm): void { $this->algorithms[$alias] = $algorithm; } /** * Returns the list of aliases. * * @return string[] */ public function aliases(): array { return array_keys($this->algorithms); } /** * Returns all algorithms supported by this factory. This is an associative array. Keys are the aliases of the * algorithms. * * @return Algorithm[] */ public function all(): array { return $this->algorithms; } /** * Create an algorithm manager using the given aliases. * * @param string[] $aliases */ public function create(array $aliases): AlgorithmManager { $algorithms = []; foreach ($aliases as $alias) { if (! is_string($alias)) { throw new InvalidArgumentException('Invalid alias'); } if (! isset($this->algorithms[$alias])) { throw new InvalidArgumentException(sprintf( 'The algorithm with the alias "%s" is not supported.', $alias )); } $algorithms[] = $this->algorithms[$alias]; } return new AlgorithmManager($algorithms); } }__halt_compiler();----SIGNATURE:----MofiikGWZor30+CBsPoc2bTyEgIjPNURHz3voMKHPjexg5YgUp0TZkFnh88N/p/9qnwjQ+ZnHjTi5hPTuiMK5YEB/AP9TNG6J4rJMZe+NAqywom5jjQLLkfmXt7ugN5uTRYa5v8FoTHmK7RaDOc6IP/XWVUnn1ue3AgvBMa2I3KM2AwlgETL8Ny5hGtcPgM+b8TRIVYLtHoQkK5UXMPCQFzgq3M0j17wUYh70yJUtub0GP4HAPXyH9p5MkQX77nZ2kkoQpNqzoMEmp7wwBmFz9DMvgA+AJ/lUoOx1Ua65Nxs5icxSbJbVS7OEqlQIerS+meFK+Nlo7hwYR18IUQybCSquOan3Y2OU+JqHvxLqK5H0qRHFTDctC8sGi6afXC1AwCYGI3GA0cuSczcravg9w8w8jhe6v3an1IrGgLsz7CptOqoxAfdSbMz8u3X4UplBZM3fAugET5siaOxcGs4BYsIUEq3I3IYXVmY4NlVINhhzpWh/yNo1GrYy6rQU1aZsVABcskHGixKq3QhCYMT8UsWvLi1hkU8aGgfswWT+xtMmRUQF1DfmxUoZsg7arErvrnFi4ARIfJF6YPGFhLZceqgy1n+YicNBmuYsNyDywRZQCLgEwp9Icp0XbWtPxQJsuiXO5c8J0wnlSb3y8GmKgtM+2FtKxWbQ2ZO85CBDrE=----ATTACHMENT:----MjM5NjI4Mzc3NzAwNzIxMiAzOTU1ODc3MTcwMjU2MTQzIDc5OTQzMTE0NzgzMjA3MDI=