Completed
Push — master ( 88d3db...887de8 )
by Michael
01:27
created
src/OneTimePad.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
src/OpensslKey.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function authenticationKey(string $info): string
84 84
     {
85
-        return $this->deriveKey(__FUNCTION__ . '|' . $info);
85
+        return $this->deriveKey(__FUNCTION__.'|'.$info);
86 86
     }
87 87
 
88 88
     /**
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function encryptionKey(string $info): string
96 96
     {
97
-        return $this->deriveKey(__FUNCTION__ . '|' . $info);
97
+        return $this->deriveKey(__FUNCTION__.'|'.$info);
98 98
     }
99 99
 
100 100
     /**
Please login to merge, or discard this patch.
src/OpensslStatic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,6 +119,6 @@
 block discarded – undo
119 119
         $chk = \hash_hmac($algo, $msg, $key->authenticationKey($cipher), true);
120 120
 
121 121
         // Return concatenation of iv + checksum + tag + ciphertext
122
-        return $ivr . $chk . $tag . $msg;
122
+        return $ivr.$chk.$tag.$msg;
123 123
     }
124 124
 }
Please login to merge, or discard this patch.
examples/vectors.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@  discard block
 block discarded – undo
8 8
 
9 9
 use Dcrypt\OpensslStatic;
10 10
 
11
-require __DIR__ . '/../vendor/autoload.php';
11
+require __DIR__.'/../vendor/autoload.php';
12 12
 
13
-$vectors = __DIR__ . '/../tests/.vectors.json';
13
+$vectors = __DIR__.'/../tests/.vectors.json';
14 14
 
15 15
 if (file_exists($vectors)) {
16 16
     $key = json_decode(file_get_contents($vectors))->key;
@@ -56,6 +56,6 @@  discard block
 block discarded – undo
56 56
     $out['otp'][$mult] = \base64_encode(\Dcrypt\OneTimePad::crypt(str_repeat('A', $mult), $key));
57 57
 }
58 58
 
59
-file_put_contents(__DIR__ . '/../tests/.vectors.json', \json_encode($out, JSON_PRETTY_PRINT));
59
+file_put_contents(__DIR__.'/../tests/.vectors.json', \json_encode($out, JSON_PRETTY_PRINT));
60 60
 
61 61
 var_dump($out);
Please login to merge, or discard this patch.
examples/support.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
  *
10 10
  * Displays supported ciphers and algos
11 11
  */
12
-require __DIR__ . '/../vendor/autoload.php';
12
+require __DIR__.'/../vendor/autoload.php';
13 13
 
14 14
 $key = \Dcrypt\OpensslKey::create();
15 15
 
Please login to merge, or discard this patch.