1 | <?php |
||
7 | class Certificate implements SignerInterface, VerifierInterface |
||
8 | { |
||
9 | /** |
||
10 | * Read a PFX certificate and return this class |
||
11 | * @param string $content |
||
12 | * @param string $password |
||
13 | * @return Certificate |
||
14 | * @throws CertificateException |
||
15 | */ |
||
16 | 5 | public static function readPfx($content, $password) |
|
34 | |||
35 | private $privateKey; |
||
36 | private $publicKey; |
||
37 | private $chainKeysString; |
||
38 | |||
39 | 4 | public function __construct( |
|
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | 2 | public function sign($content, $algorithm = OPENSSL_ALGO_SHA1) |
|
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | 1 | public function verify($data, $signature, $algorithm = OPENSSL_ALGO_SHA1) |
|
64 | |||
65 | 1 | public function publicKey() : string |
|
69 | } |
||
70 |