1 | <?php |
||
5 | class PublicKey implements VerifierInterface |
||
6 | { |
||
7 | const SIGNATURE_CORRECT = 1; |
||
8 | const SIGNATURE_INCORRECT = 0; |
||
9 | const SIGNATURE_ERROR = -1; |
||
10 | |||
11 | private $key; |
||
12 | |||
13 | 7 | public function __construct(string $key) |
|
17 | |||
18 | /** |
||
19 | * {@inheritdoc} |
||
20 | */ |
||
21 | 3 | public function verify($data, $signature, $algorithm = OPENSSL_ALGO_SHA1) |
|
29 | |||
30 | /** |
||
31 | * Returns unformated public key |
||
32 | * @return string |
||
33 | */ |
||
34 | 2 | public function unformated() |
|
39 | } |
||
40 |