1 | <?php |
||
7 | final class AggregateHashAlgorithm |
||
8 | { |
||
9 | /** |
||
10 | * @var HashAlgorithmInterface[] |
||
11 | */ |
||
12 | protected $algorithms = []; |
||
13 | |||
14 | /** |
||
15 | * @param HashAlgorithmInterface[] $algorithms |
||
16 | */ |
||
17 | public function __construct(array $algorithms = []) |
||
24 | |||
25 | public function addAlgorithm(HashAlgorithmInterface $algorithm): AggregateHashAlgorithm |
||
36 | |||
37 | public function initialize() |
||
44 | |||
45 | public function digest(string $buffer) |
||
52 | |||
53 | /** |
||
54 | * Finalizes hash computations and returns hashes as map algorithm->hash. |
||
55 | * |
||
56 | * @return array |
||
57 | */ |
||
58 | public function finalize() |
||
69 | } |
||
70 |