Completed
Push — master ( af9906...da1e53 )
by Guillermo
10s
created
src/UrlCrypt/UrlCrypt.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
         $iv = openssl_random_pseudo_bytes($this->ivSize);
83 83
         $cipherText = openssl_encrypt($string, $this->cipher, $key, OPENSSL_RAW_DATA, $iv);
84 84
 
85
-        if(false === $cipherText) {
85
+        if (false === $cipherText) {
86 86
             $this->throwOpensslError();
87 87
         }
88 88
 
89
-        return $this->encode(base64_encode($cipherText).'::'.base64_encode($iv));
89
+        return $this->encode(base64_encode($cipherText) . '::' . base64_encode($iv));
90 90
     }
91 91
 
92 92
     public function decrypt(string $string, string $key): string
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         $key = $this->legacyPrepareKey($key);
134 134
         $iv = substr($string, 0, $this->ivSize);
135 135
         $string = substr($string, $this->ivSize);
136
-        $string = openssl_decrypt($string, $this->cipher, $key, OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING, $iv);
136
+        $string = openssl_decrypt($string, $this->cipher, $key, OPENSSL_RAW_DATA | OPENSSL_ZERO_PADDING, $iv);
137 137
 
138 138
         preg_match_all('#([\\000]+)$#', $string, $matches);
139 139
         if (isset($matches[1][0]) && mb_strlen($matches[1][0], '8bit') > 1) {
Please login to merge, or discard this patch.