@@ -64,7 +64,7 @@ |
||
64 | 64 | * |
65 | 65 | * {@inheritdoc} |
66 | 66 | */ |
67 | - protected function _encryptKey($key, Header &$header) |
|
67 | + protected function _encryptKey($key, Header&$header) |
|
68 | 68 | { |
69 | 69 | if ($key != $this->_cek) { |
70 | 70 | throw new \LogicException("Content encryption key doesn't match."); |
@@ -113,7 +113,7 @@ |
||
113 | 113 | * |
114 | 114 | * {@inheritdoc} |
115 | 115 | */ |
116 | - protected function _encryptKey($key, Header &$header) |
|
116 | + protected function _encryptKey($key, Header&$header) |
|
117 | 117 | { |
118 | 118 | return $this->_kw()->wrap($key, $this->_kek); |
119 | 119 | } |
@@ -189,7 +189,7 @@ |
||
189 | 189 | * |
190 | 190 | * {@inheritdoc} |
191 | 191 | */ |
192 | - protected function _encryptKey($key, Header &$header) |
|
192 | + protected function _encryptKey($key, Header&$header) |
|
193 | 193 | { |
194 | 194 | return $this->_kwAlgo()->wrap($key, $this->_derivedKey()); |
195 | 195 | } |
@@ -151,7 +151,7 @@ |
||
151 | 151 | * |
152 | 152 | * {@inheritdoc} |
153 | 153 | */ |
154 | - protected function _encryptKey($key, Header &$header) |
|
154 | + protected function _encryptKey($key, Header&$header) |
|
155 | 155 | { |
156 | 156 | $pubkey = openssl_pkey_get_public( |
157 | 157 | $this->publicKey() |
@@ -148,7 +148,7 @@ |
||
148 | 148 | * @see \JWX\JWE\KeyManagementAlgorithm::_encryptKey() |
149 | 149 | * @return string |
150 | 150 | */ |
151 | - protected function _encryptKey($key, Header &$header) |
|
151 | + protected function _encryptKey($key, Header&$header) |
|
152 | 152 | { |
153 | 153 | list($ciphertext, $auth_tag) = $this->_getGCM()->encrypt($key, "", |
154 | 154 | $this->_kek, $this->_iv); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * be updated to contain parameters specific to the encryption |
36 | 36 | * @return string Ciphertext |
37 | 37 | */ |
38 | - abstract protected function _encryptKey($key, Header &$header); |
|
38 | + abstract protected function _encryptKey($key, Header&$header); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Decrypt a key. |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | * @throws \RuntimeException For generic errors |
59 | 59 | * @return string Encrypted key |
60 | 60 | */ |
61 | - final public function encrypt($cek, Header &$header = null) |
|
61 | + final public function encrypt($cek, Header&$header = null) |
|
62 | 62 | { |
63 | 63 | if (!isset($header)) { |
64 | 64 | $header = new Header(); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | "JWK Set must have a 'keys' member."); |
66 | 66 | } |
67 | 67 | $jwks = array_map( |
68 | - function ($jwkdata) { |
|
68 | + function($jwkdata) { |
|
69 | 69 | return JWK::fromArray($jwkdata); |
70 | 70 | }, $members["keys"]); |
71 | 71 | unset($members["keys"]); |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | { |
199 | 199 | $data = $this->_additional; |
200 | 200 | $data["keys"] = array_map( |
201 | - function (JWK $jwk) { |
|
201 | + function(JWK $jwk) { |
|
202 | 202 | return $jwk->toArray(); |
203 | 203 | }, $this->_jwks); |
204 | 204 | return $data; |
@@ -70,9 +70,9 @@ |
||
70 | 70 | // time_mid |
71 | 71 | mt_rand(0, 0xffff), |
72 | 72 | // time_hi_and_version |
73 | - mt_rand(0, 0x0fff) | 0x4000, |
|
73 | + mt_rand(0, 0x0fff)|0x4000, |
|
74 | 74 | // clk_seq_hi_res |
75 | - mt_rand(0, 0x3f) | 0x80, |
|
75 | + mt_rand(0, 0x3f)|0x80, |
|
76 | 76 | // clk_seq_low |
77 | 77 | mt_rand(0, 0xff), |
78 | 78 | // node |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public static function fromBase256($octets) |
49 | 49 | { |
50 | - $num = gmp_import($octets, 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN); |
|
50 | + $num = gmp_import($octets, 1, GMP_MSW_FIRST|GMP_BIG_ENDIAN); |
|
51 | 51 | return new self($num); |
52 | 52 | } |
53 | 53 | |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function base256() |
80 | 80 | { |
81 | - return gmp_export($this->_num, 1, GMP_MSW_FIRST | GMP_BIG_ENDIAN); |
|
81 | + return gmp_export($this->_num, 1, GMP_MSW_FIRST|GMP_BIG_ENDIAN); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |