Total Complexity | 2 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class Formatter |
||
11 | { |
||
12 | /** |
||
13 | * @param SignatureInterface $signature |
||
14 | * @return Sequence |
||
15 | */ |
||
16 | public function toAsn(SignatureInterface $signature): Sequence |
||
17 | { |
||
18 | return new Sequence( |
||
19 | new Integer(gmp_strval($signature->getR(), 10)), |
||
|
|||
20 | new Integer(gmp_strval($signature->getS(), 10)) |
||
21 | ); |
||
22 | } |
||
23 | |||
24 | /** |
||
25 | * @param SignatureInterface $signature |
||
26 | * @return string |
||
27 | */ |
||
28 | public function serialize(SignatureInterface $signature): string |
||
31 | } |
||
32 | } |
||
33 |