Completed
Push — master ( 9d0c67...04e799 )
by Michael
01:28
created
support.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
 foreach (hash_algos() as $algo) {
6 6
     foreach (openssl_get_cipher_methods() as $meth) {
Please login to merge, or discard this patch.
phpunit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-require __DIR__ . '/vendor/autoload.php';
4
-require __DIR__ . '/tests/AesBase.php';
3
+require __DIR__.'/vendor/autoload.php';
4
+require __DIR__.'/tests/AesBase.php';
Please login to merge, or discard this patch.
src/Pkcs7.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Pkcs7.php
@@ -41,7 +41,7 @@  discard block
 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.
src/Hash.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Hash.php
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $chsh = self::costHash($cost, $pass);
70 70
 
71 71
         // Return the salt + cost + hmac as a single string
72
-        return $salt . $chsh . $cost . $hash;
72
+        return $salt.$chsh.$cost.$hash;
73 73
     }
74 74
 
75 75
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $packed = pack('N', $cost);
87 87
 
88 88
         // Encrypt the string with the Otp stream cipher
89
-        return Otp::crypt($packed, ($pass . $salt), self::ALGO);
89
+        return Otp::crypt($packed, ($pass.$salt), self::ALGO);
90 90
     }
91 91
 
92 92
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     private static function costDecrypt(string $pack, string $salt, string $pass): int
101 101
     {
102 102
         // Decrypt the cost value stored in the 32bit int
103
-        $pack = Otp::crypt($pack, ($pass . $salt), self::ALGO);
103
+        $pack = Otp::crypt($pack, ($pass.$salt), self::ALGO);
104 104
 
105 105
         // Unpack the value back to an integer and return to caller
106 106
         return unpack('N', $pack)[1];
Please login to merge, or discard this patch.
src/OpensslWrapper.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
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * OpensslWrapper.php
Please login to merge, or discard this patch.
src/OpensslBridge.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
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * OpensslBridge.php
Please login to merge, or discard this patch.
src/Str.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Str.php
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
         // We hash the 2 inputs at this point because hash_equals is still 
51 51
         // vulnerable to timing attacks when the inputs have different sizes.
52 52
         // Inputs are also cast to string like in symfony stringutils.
53
-        $known = \hash_hmac('sha256', (string)$known, $nonce, true);
54
-        $given = \hash_hmac('sha256', (string)$given, $nonce, true);
53
+        $known = \hash_hmac('sha256', (string) $known, $nonce, true);
54
+        $given = \hash_hmac('sha256', (string) $given, $nonce, true);
55 55
 
56 56
         return \hash_equals($known, $given);
57 57
     }
Please login to merge, or discard this patch.
src/Otp.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * Otp.php
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $length = Str::strlen($input);
45 45
 
46 46
         foreach ($chunks as $i => &$chunk) {
47
-            $chunk = $chunk ^ \hash_hmac($algo, $password . $length, $i, true);
47
+            $chunk = $chunk ^ \hash_hmac($algo, $password.$length, $i, true);
48 48
         }
49 49
 
50 50
         return \implode($chunks);
Please login to merge, or discard this patch.
src/AesOfb.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
-declare(strict_types = 1);
3
+declare(strict_types=1);
4 4
 
5 5
 /**
6 6
  * AesOfb.php
Please login to merge, or discard this patch.