Conditions | 5 |
Paths | 5 |
Total Lines | 19 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
30 | public function link(array $signatures, array $publicKeys, BufferInterface $messageHash) |
||
31 | { |
||
32 | $sigCount = count($signatures); |
||
33 | $storage = new \SplObjectStorage(); |
||
34 | foreach ($signatures as $signature) { |
||
35 | foreach ($publicKeys as $key) { |
||
36 | if ($this->ecAdapter->verify($messageHash, $key, $signature)) { |
||
37 | $storage->attach($key, $signature); |
||
38 | if (count($storage) === $sigCount) { |
||
39 | break 2; |
||
40 | } |
||
41 | |||
42 | break; |
||
43 | } |
||
44 | } |
||
45 | } |
||
46 | |||
47 | return $storage; |
||
48 | } |
||
49 | } |
||
50 |