@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | foreach ($chunks as $i => &$chunk) { |
46 | 46 | // Create the info key based on counter |
47 | - $info = $length . $i; |
|
47 | + $info = $length.$i; |
|
48 | 48 | |
49 | 49 | // Xor the derived key with the data chunk |
50 | 50 | $chunk = $chunk ^ $key->deriveKey($info); |
@@ -121,6 +121,6 @@ |
||
121 | 121 | $chk = $key->messageChecksum($msg); |
122 | 122 | |
123 | 123 | // Return concatenation of iv + checksum + tag + ciphertext |
124 | - return $ivr . $chk . $tag . $msg; |
|
124 | + return $ivr.$chk.$tag.$msg; |
|
125 | 125 | } |
126 | 126 | } |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function authenticationKey(): string |
108 | 108 | { |
109 | - return $this->deriveKey(__FUNCTION__ . '|' . $this->_cipher); |
|
109 | + return $this->deriveKey(__FUNCTION__.'|'.$this->_cipher); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function encryptionKey(): string |
119 | 119 | { |
120 | - return $this->deriveKey(__FUNCTION__ . '|' . $this->_cipher); |
|
120 | + return $this->deriveKey(__FUNCTION__.'|'.$this->_cipher); |
|
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | { |
133 | 133 | try { |
134 | 134 | $key = hash_hkdf($this->_algo, $this->_key, 0, $info, $this->_iv); |
135 | - } catch(Exception|ValueError $e) { |
|
135 | + } catch (Exception | ValueError $e) { |
|
136 | 136 | throw new InternalOperationException($e->getMessage()); |
137 | 137 | } |
138 | 138 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | { |
158 | 158 | try { |
159 | 159 | $hmac = hash_hmac($this->_algo, $message, $this->authenticationKey(), true); |
160 | - } catch(ValueError $e) { |
|
160 | + } catch (ValueError $e) { |
|
161 | 161 | throw new InternalOperationException($e->getMessage()); |
162 | 162 | } |
163 | 163 |