|
|
@@ -18,8 +18,11 @@ class DecryptController extends ControllerBase |
|
|
|
$args = $this->request->getJsonRawBody(true); |
|
|
|
$aesKey = $args["aes_key"] ?? "n1UenLsnSPxi2KsTv3y/0Q=="; //AES密钥 |
|
|
|
$content = $args["content"] ?? "Ho5y3nixH0tSnYWw8p/HMTO1bIONKSYd7BfkbI+ww4qgJEXKMYFWnSwjXN2B9YwvsKBYykK2gva2v1jfnQVSNQ=="; |
|
|
|
$this->logger($args, 'Decrypt', true); |
|
|
|
$result = openssl_decrypt(base64_decode($content), 'AES-128-CBC', base64_decode($aesKey), OPENSSL_RAW_DATA); |
|
|
|
$this->logger([ |
|
|
|
"args" => $args, |
|
|
|
"content" => $content, |
|
|
|
], 'Decrypt', true); |
|
|
|
if (!$result) { |
|
|
|
$this->api(Msg::NewError(500, 'AES解密失败!')); |
|
|
|
} |
|
|
|