Total Complexity | 3 |
Total Lines | 46 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
5 | final class Keypair |
||
6 | { |
||
7 | /** |
||
8 | * Secret key |
||
9 | * |
||
10 | * @var string |
||
11 | */ |
||
12 | private $secret; |
||
13 | |||
14 | /** |
||
15 | * Public Key |
||
16 | * |
||
17 | * @var string |
||
18 | */ |
||
19 | private $public; |
||
20 | |||
21 | /** |
||
22 | * Constructor |
||
23 | * |
||
24 | * @param string $secret |
||
25 | * @param string $public |
||
26 | */ |
||
27 | public function __construct(string $secret, string $public) |
||
28 | { |
||
29 | $this->secret = $secret; |
||
30 | $this->public = $public; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Returns the public key |
||
35 | * |
||
36 | * @return string|null |
||
37 | */ |
||
38 | public function getPublicKey() :? string |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Returns the secret key |
||
45 | * |
||
46 | * @return string|null |
||
47 | */ |
||
48 | public function getSecretKey() :? string |
||
51 | } |
||
52 | } |
||
53 |