This commit is contained in:
MeSHard
2025-11-10 16:12:07 +08:00
parent 99f88bc53e
commit 94f7e83679
181 changed files with 15770 additions and 0 deletions

18
app/controller/Aes.php Normal file
View File

@@ -0,0 +1,18 @@
<?php
namespace app\controller;
class Aes
{
public function encrypt($input)
{
return base64_encode(openssl_encrypt($input, 'AES-128-CBC', config('hard.DataSecret'), OPENSSL_RAW_DATA, config('hard.DataSecretIV')));
}
public function decrypt($input)
{
return openssl_decrypt(base64_decode($input), 'AES-128-CBC', config('hard.DataSecret'), OPENSSL_RAW_DATA, config('hard.DataSecretIV'));
}
}