|
|
@@ -10,13 +10,14 @@ class PhoneHelper
|
|
10
|
10
|
// $iv = random_bytes(16);
|
|
11
|
11
|
$iv = "77f*eb51d38[b947";
|
|
12
|
12
|
$encrypted = openssl_encrypt($phone, 'AES-128-CBC', $key, 0, $iv);
|
|
13
|
|
- return base64_encode($iv . '||' . $encrypted);
|
|
|
13
|
+ return base64_encode($encrypted);
|
|
14
|
14
|
}
|
|
15
|
|
-
|
|
|
15
|
+ /*
|
|
16
|
16
|
public static function decrypt(string $encrypted): string
|
|
17
|
17
|
{
|
|
18
|
18
|
$key = config('app.phone_encrypt_key');
|
|
19
|
19
|
[$iv, $data] = explode('||', base64_decode($encrypted));
|
|
20
|
20
|
return openssl_decrypt($data, 'AES-128-CBC', $key, 0, $iv);
|
|
21
|
|
- }
|
|
|
21
|
+ }*/
|
|
|
22
|
+
|
|
22
|
23
|
}
|