1 | <?php |
||
14 | class CryptKey |
||
15 | { |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected $keyPath; |
||
20 | |||
21 | /** |
||
22 | * @var null|string |
||
23 | */ |
||
24 | protected $passPhrase; |
||
25 | |||
26 | /** |
||
27 | * @param string $keyPath |
||
28 | * @param null|string $passPhrase |
||
29 | */ |
||
30 | public function __construct($keyPath, $passPhrase = null) |
||
43 | |||
44 | /** |
||
45 | * Retrieve key path. |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | public function getKeyPath() |
||
53 | |||
54 | /** |
||
55 | * Retrieve key pass phrase. |
||
56 | * |
||
57 | * @return null|string |
||
58 | */ |
||
59 | public function getPassPhrase() |
||
63 | |||
64 | /** |
||
65 | * @param $key |
||
66 | * @param null $passPhrase |
||
67 | * @return CryptKey |
||
68 | */ |
||
69 | public static function fromString($key, $passPhrase = null) |
||
83 | } |
||
84 |