Passed
Push — master ( 634b6b...393309 )
by Morris
16:53 queued 11s
created
lib/private/Security/Crypto.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		}
75 75
 
76 76
 		// Append an "a" behind the password and hash it to prevent reusing the same password as for encryption
77
-		$password = hash('sha512', $password . 'a');
77
+		$password = hash('sha512', $password.'a');
78 78
 
79 79
 		$hash = new Hash('sha512');
80 80
 		$hash->setKey($password);
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 		$this->cipher->setPassword($encryptionKey);
144 144
 		$this->cipher->setIV($iv);
145 145
 
146
-		if (!hash_equals($this->calculateHMAC($parts[0] . $parts[1], $hmacKey), $hmac)) {
146
+		if (!hash_equals($this->calculateHMAC($parts[0].$parts[1], $hmacKey), $hmac)) {
147 147
 			throw new \Exception('HMAC does not match.');
148 148
 		}
149 149
 
@@ -157,15 +157,15 @@  discard block
 block discarded – undo
157 157
 
158 158
 	private function hex2bin(string $hex): string {
159 159
 		if (!ctype_xdigit($hex)) {
160
-			throw new \RuntimeException('String contains non hex chars: ' . $hex);
160
+			throw new \RuntimeException('String contains non hex chars: '.$hex);
161 161
 		}
162 162
 		if (strlen($hex) % 2 !== 0) {
163
-			throw new \RuntimeException('Hex string is not of even length: ' . $hex);
163
+			throw new \RuntimeException('Hex string is not of even length: '.$hex);
164 164
 		}
165 165
 		$result = hex2bin($hex);
166 166
 
167 167
 		if ($result === false) {
168
-			throw new \RuntimeException('Hex to bin conversion failed: ' . $hex);
168
+			throw new \RuntimeException('Hex to bin conversion failed: '.$hex);
169 169
 		}
170 170
 
171 171
 		return $result;
Please login to merge, or discard this patch.