| 1 | <?php |
||
| 11 | class JWK |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | protected $kty; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $n; |
||
|
1 ignored issue
–
show
|
|||
| 22 | |||
| 23 | /** |
||
| 24 | * @var string |
||
| 25 | */ |
||
| 26 | protected $e; |
||
|
1 ignored issue
–
show
|
|||
| 27 | |||
| 28 | /** |
||
| 29 | * @param array $parameters |
||
| 30 | * @throws InvalidJWK |
||
| 31 | */ |
||
| 32 | public function __construct($parameters) |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | public function getPublicKey() |
||
| 91 | |||
| 92 | /** |
||
| 93 | * DER-encode the length |
||
| 94 | * |
||
| 95 | * DER supports lengths up to (2**8)**127, however, we'll only support lengths up to (2**8)**4. See |
||
| 96 | * {@link http://itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#p=13 X.690 paragraph 8.1.3} for more information. |
||
| 97 | * |
||
| 98 | * @access private |
||
| 99 | * @param int $length |
||
| 100 | * @return string |
||
| 101 | */ |
||
| 102 | private static function encodeLength($length) |
||
| 111 | } |
||
| 112 |
Short variable names may make your code harder to understand. Variable names should be self-descriptive. This check looks for variable names who are shorter than a configured minimum.