1 | <?php namespace security\rsa; |
||
21 | abstract class _AbstractRSAKeyPEMFormat { |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | protected $pem_format; |
||
27 | |||
28 | /** |
||
29 | * @var RSA |
||
30 | */ |
||
31 | protected $rsa_imp; |
||
32 | |||
33 | /** |
||
34 | * @var BigInteger |
||
35 | */ |
||
36 | protected $n; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $password; |
||
42 | |||
43 | /** |
||
44 | * @return null|string |
||
45 | */ |
||
46 | public function getPassword():?string{ |
||
49 | |||
50 | /** |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function hasPassword():bool{ |
||
56 | |||
57 | /** |
||
58 | * @param string $pem_format |
||
59 | * @param string $password |
||
60 | * @throws RSABadPEMFormat |
||
61 | */ |
||
62 | public function __construct($pem_format, $password = null){ |
||
78 | |||
79 | /** |
||
80 | * Returns The "n" (modulus) |
||
81 | * @return BigInteger |
||
82 | */ |
||
83 | public function getModulus() |
||
87 | |||
88 | } |