Completed
Pull Request — master (#14)
by Michael
01:34
created
load.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
     );
37 37
 
38 38
     foreach ($files as $f) {
39
-        require_once __DIR__ . "/src/$f.php";
39
+        require_once __DIR__."/src/$f.php";
40 40
     }
41 41
 }
42 42
 // @codeCoverageIgnoreEnd
Please login to merge, or discard this patch.
src/Pkcs7.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         $pad = self::paddingString(Str::strlen($input), $blocksize);
42 42
 
43 43
         // Return input + padding
44
-        return $input . $pad;
44
+        return $input.$pad;
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
phpunit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__ . '/vendor/autoload.php';
3
+require __DIR__.'/vendor/autoload.php';
4 4
 
5 5
 // backward compatibility
6 6
 if (!class_exists('\PHPUnit\Framework\TestCase')) {
Please login to merge, or discard this patch.
src/Otp.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $length = Str::strlen($input);
54 54
         
55 55
         foreach ($chunks as $i => &$chunk) {
56
-            $chunk = $chunk ^ \hash_hmac($algo, $password . $length, $i, true);
56
+            $chunk = $chunk ^ \hash_hmac($algo, $password.$length, $i, true);
57 57
         }
58 58
 
59 59
         return \implode($chunks);
Please login to merge, or discard this patch.
src/Hash.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $hash = self::ihmac($input, $key, $cost, self::ALGO);
61 61
 
62 62
         // Return the salt + cost blob + hmac
63
-        return $salt . self::costHash($cost, $salt, $password) . $hash;
63
+        return $salt.self::costHash($cost, $salt, $password).$hash;
64 64
     }
65 65
 
66 66
     /**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         // Convert cost to base 256 then encrypt with OTP stream cipher
84 84
         $cost = Otp::crypt(self::dec2bin($cost), $password);
85 85
 
86
-        return $hash . $cost;
86
+        return $hash.$cost;
87 87
     }
88 88
 
89 89
     /**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         // Perform iterative hmac calls
105 105
         // Make sure $iter value of 0 is handled
106 106
         for ($i = 0; $i <= $iter; $i++) {
107
-            $data = self::hmac($data . $i . $iter, $key, $algo);
107
+            $data = self::hmac($data.$i.$iter, $key, $algo);
108 108
         }
109 109
 
110 110
         return $data;
Please login to merge, or discard this patch.
src/OpensslBridge.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,6 @@
 block discarded – undo
97 97
      * @param string $data Ciphertext that needs a checksum.
98 98
      * @param string $iv   Initialization vector.
99 99
      * @param string $key  HMAC key
100
-     * @param string $mode Cipher mode (cbc, ctr)
101 100
      * @return string
102 101
      */
103 102
     private static function checksum(string $data, string $iv, string $key): string
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
         $msg = OpensslWrapper::encrypt($data, static::CIPHER, $key, $ivr);
86 86
 
87 87
         // Create the cypher text prefix (iv + checksum)
88
-        $pre = $ivr . static::checksum($msg, $ivr, $key);
88
+        $pre = $ivr.static::checksum($msg, $ivr, $key);
89 89
 
90 90
         // Return prefix + cyphertext
91
-        return $pre . $msg;
91
+        return $pre.$msg;
92 92
     }
93 93
 
94 94
     /**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $sum = Hash::hmac($data, $key, static::CHKSUM);
108 108
 
109 109
         // Then add the other input elements together before performing the final hash
110
-        $sum = $sum . $iv . static::mode() . self::RIJNDA;
110
+        $sum = $sum.$iv.static::mode().self::RIJNDA;
111 111
 
112 112
         // ... then hash other elements with previous hmac and return
113 113
         return Hash::hmac($sum, $key, static::CHKSUM);
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     private static function key(string $pass, string $iv, int $cost): string
125 125
     {
126
-        $data = $iv . self::RIJNDA . static::mode();
126
+        $data = $iv.self::RIJNDA.static::mode();
127 127
 
128 128
         return Hash::ihmac($data, $pass, $cost, static::CHKSUM);
129 129
     }
Please login to merge, or discard this patch.