liyinglin 2 years ago
parent f832041ffa
commit 5f17008d27

@ -214,18 +214,10 @@ class AuthController extends Controller
$sessionKey = request()->sessionKey;
$iv = request()->iv;
// $aesKey = base64_decode($sessionKey);
// $aesIV = base64_decode($iv);
// $aesCipher = base64_decode($encryptedData);
// $result = openssl_decrypt($aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV);
$config = [
'app_id' => $this->appid,
'secret' => $this->appsecret
];
$app = Factory::miniProgram($config);
$result = $app->encryptor->decryptData($sessionKey, $iv, $encryptedData);
dd($result);
$aesKey = base64_decode($sessionKey);
$aesIV = base64_decode($iv);
$aesCipher = base64_decode($encryptedData);
$result = openssl_decrypt($aesCipher, "AES-128-CBC", $aesKey, 1, $aesIV);
Log::channel("get_mobile_by_openid")->info($result);

Loading…
Cancel
Save