1 | <?php |
||
18 | abstract class PrivateKeyJWK extends JWK |
||
19 | { |
||
20 | /** |
||
21 | * Get the public key component of the asymmetric key pair. |
||
22 | * |
||
23 | * @return PublicKeyJWK |
||
24 | */ |
||
25 | abstract public function publicKey(); |
||
26 | |||
27 | /** |
||
28 | * Convert private key to PEM. |
||
29 | * |
||
30 | * @return PEM |
||
31 | */ |
||
32 | abstract public function toPEM(); |
||
33 | |||
34 | /** |
||
35 | * Initialize from a PrivateKey object. |
||
36 | * |
||
37 | * @param PrivateKey $priv_key Private key |
||
38 | * @throws \UnexpectedValueException |
||
39 | * @return self |
||
40 | */ |
||
41 | 3 | public static function fromPrivateKey(PrivateKey $priv_key) { |
|
50 | |||
51 | /** |
||
52 | * Initialize from a PrivateKeyInfo object. |
||
53 | * |
||
54 | * @param PrivateKeyInfo $pki PrivateKeyInfo |
||
55 | * @return self |
||
56 | */ |
||
57 | 2 | public static function fromPrivateKeyInfo(PrivateKeyInfo $pki) { |
|
60 | } |
||
61 |