AI代码生成工具
This commit is contained in:
@@ -397,7 +397,7 @@ if(!function_exists('ase_encode')) {
|
||||
function ase_encode($str)
|
||||
{
|
||||
if (empty($str)) return $str;
|
||||
return base64_encode(\Illuminate\Support\Str::random(config('ase.len')). base64_encode($str));
|
||||
return base64_encode(\Illuminate\Support\Str::random(config('nl.ase_len', 30)). base64_encode($str));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,7 +411,7 @@ if (!function_exists('ase_decode')) {
|
||||
{
|
||||
if (empty($str)) return $str?? '';
|
||||
$result = base64_decode($str);
|
||||
$result = base64_decode(substr($result, config('ase.len')));
|
||||
$result = base64_decode(substr($result, config('nl.ase_len', 30)));
|
||||
$pattern = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\xFF]|[\x{E000}-\x{F8FF}]/u';
|
||||
if (preg_match($pattern, $result)) return $str;
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user