@@ -5,7 +5,7 @@ |
||
5 | 5 | foreach (hash_algos() as $algo) { |
6 | 6 | foreach (openssl_get_cipher_methods() as $meth) { |
7 | 7 | // Skip any unsupported ciphers |
8 | - if (!\openssl_cipher_iv_length($meth)) { |
|
8 | + if (!\openssl_cipher_iv_length($meth)) { |
|
9 | 9 | continue; |
10 | 10 | } |
11 | 11 |
@@ -24,8 +24,8 @@ |
||
24 | 24 | * @link https://github.com/mmeyer2k/dcrypt |
25 | 25 | * @link https://apigen.ci/github/mmeyer2k/dcrypt/namespace-Dcrypt.html |
26 | 26 | */ |
27 | -class AesOfb extends AesCbc |
|
28 | -{ |
|
27 | +class AesOfb extends AesCbc |
|
28 | +{ |
|
29 | 29 | /** |
30 | 30 | * AES-256 cipher identifier that will be passed to openssl |
31 | 31 | * |
@@ -14,8 +14,8 @@ discard block |
||
14 | 14 | |
15 | 15 | namespace Dcrypt; |
16 | 16 | |
17 | -class OpensslStatic |
|
18 | -{ |
|
17 | +class OpensslStatic |
|
18 | +{ |
|
19 | 19 | public static function decrypt(string $data, string $pass, string $cipher, string $algo): string |
20 | 20 | { |
21 | 21 | // Calculate the hash checksum size in bytes for the specified algo |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $chk = \hash_hmac($algo, ($msg . $itr . $ivr), $pass, true); |
48 | 48 | |
49 | 49 | // Verify HMAC before decrypting |
50 | - if (!Str::equal($chk, $sum)) { |
|
50 | + if (!Str::equal($chk, $sum)) { |
|
51 | 51 | throw new \InvalidArgumentException('Decryption can not proceed due to invalid cyphertext checksum.'); |
52 | 52 | } |
53 | 53 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | ]; |
103 | 103 | |
104 | 104 | foreach ($needle_tips as $needle) { |
105 | - if (strpos($cipher, $needle)) { |
|
105 | + if (strpos($cipher, $needle)) { |
|
106 | 106 | return true; |
107 | 107 | } |
108 | 108 | } |
@@ -24,8 +24,8 @@ |
||
24 | 24 | * @link https://github.com/mmeyer2k/dcrypt |
25 | 25 | * @link https://apigen.ci/github/mmeyer2k/dcrypt/namespace-Dcrypt.html |
26 | 26 | */ |
27 | -class AesGcm extends AesCbc |
|
28 | -{ |
|
27 | +class AesGcm extends AesCbc |
|
28 | +{ |
|
29 | 29 | /** |
30 | 30 | * AES-256 cipher identifier that will be passed to openssl |
31 | 31 | * |