@@ -27,7 +27,7 @@ |
||
27 | 27 | /** |
28 | 28 | * Constructor |
29 | 29 | * |
30 | - * @param string $key Content encryption key |
|
30 | + * @param string $cek |
|
31 | 31 | */ |
32 | 32 | public function __construct($cek) { |
33 | 33 | $this->_cek = $cek; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | return $this->_cek; |
53 | 53 | } |
54 | 54 | |
55 | - protected function _encryptKey($key, Header &$header) { |
|
55 | + protected function _encryptKey($key, Header&$header) { |
|
56 | 56 | if ($key != $this->_cek) { |
57 | 57 | throw new \LogicException("Content encryption key doesn't match."); |
58 | 58 | } |
@@ -13,7 +13,6 @@ |
||
13 | 13 | /** |
14 | 14 | * Constructor |
15 | 15 | * |
16 | - * @param string $algo Key ID |
|
17 | 16 | */ |
18 | 17 | public function __construct($id) { |
19 | 18 | parent::__construct(self::PARAM_KEY_ID, $id); |
@@ -35,6 +35,7 @@ |
||
35 | 35 | * Constructor |
36 | 36 | * |
37 | 37 | * @param JWKParameter ...$params |
38 | + * @param JWKParameter[] $params |
|
38 | 39 | * @throws \UnexpectedValueException If missing required parameter |
39 | 40 | */ |
40 | 41 | public function __construct(JWKParameter ...$params) { |
@@ -47,9 +47,9 @@ |
||
47 | 47 | /** |
48 | 48 | * Constructor |
49 | 49 | * |
50 | - * @param Header $header JWS Protected Header |
|
51 | 50 | * @param string $payload JWS Payload |
52 | 51 | * @param string $signature JWS Signature |
52 | + * @param string $signature_input |
|
53 | 53 | */ |
54 | 54 | protected function __construct(Header $protected_header, $payload, |
55 | 55 | $signature_input, $signature) { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * Constructor |
15 | 15 | * |
16 | - * @param string $type |
|
16 | + * @param string $algo |
|
17 | 17 | */ |
18 | 18 | public function __construct($algo) { |
19 | 19 | parent::__construct(self::PARAM_COMPRESSION_ALGORITHM, (string) $algo); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | * be updated to contain parameters specific to the encryption |
23 | 23 | * @return string Ciphertext |
24 | 24 | */ |
25 | - abstract protected function _encryptKey($key, Header &$header); |
|
25 | + abstract protected function _encryptKey($key, Header&$header); |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Decrypt a key. |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @throws \RuntimeException For generic errors |
46 | 46 | * @return string Encrypted key |
47 | 47 | */ |
48 | - final public function encrypt($cek, Header &$header = null) { |
|
48 | + final public function encrypt($cek, Header&$header = null) { |
|
49 | 49 | if (!isset($header)) { |
50 | 50 | $header = new Header(); |
51 | 51 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | * @return self |
46 | 46 | */ |
47 | 47 | public static function fromBase256($octets) { |
48 | - $num = gmp_import($octets, 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN); |
|
48 | + $num = gmp_import($octets, 1, GMP_MSW_FIRST|GMP_BIG_ENDIAN); |
|
49 | 49 | return new self($num); |
50 | 50 | } |
51 | 51 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | * @return string |
74 | 74 | */ |
75 | 75 | public function base256() { |
76 | - return gmp_export($this->_num, 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN); |
|
76 | + return gmp_export($this->_num, 1, GMP_MSW_FIRST|GMP_BIG_ENDIAN); |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | public function __toString() { |
@@ -69,9 +69,9 @@ |
||
69 | 69 | // time_mid |
70 | 70 | mt_rand(0, 0xffff), |
71 | 71 | // time_hi_and_version |
72 | - mt_rand(0, 0x0fff) | 0x4000, |
|
72 | + mt_rand(0, 0x0fff)|0x4000, |
|
73 | 73 | // clk_seq_hi_res |
74 | - mt_rand(0, 0x3f) | 0x80, |
|
74 | + mt_rand(0, 0x3f)|0x80, |
|
75 | 75 | // clk_seq_low |
76 | 76 | mt_rand(0, 0xff), |
77 | 77 | // node |
@@ -56,7 +56,7 @@ |
||
56 | 56 | "JWK Set must have a 'keys' member."); |
57 | 57 | } |
58 | 58 | $jwks = array_map( |
59 | - function ($jwkdata) { |
|
59 | + function($jwkdata) { |
|
60 | 60 | return JWK::fromArray($jwkdata); |
61 | 61 | }, $members["keys"]); |
62 | 62 | unset($members["keys"]); |