星辰影院解锁vip v1.0.4版本的 MD5 值为:3d99bbcbb0d5d5e568b9f6134424c24e
以下内容为反编译后的 c.java 源代码,内容仅作参考
package com.iqiyi.passportsdk.s.e;
import android.content.Context;
import android.content.pm.PackageManager;
import android.content.pm.Signature;
import com.iqiyi.psdk.base.j.k;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.LinkedHashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class c {
static final d.b.a<String, com.iqiyi.passportsdk.interflow.core.b> a = new d.b.a<>();
private static final d.b.a<String, com.iqiyi.passportsdk.interflow.core.b> f6862b = new d.b.a<>();
private static final LinkedHashMap<String, com.iqiyi.passportsdk.interflow.core.b> f6863c = new LinkedHashMap<>();
private static boolean f6864d = false;
public static void a(String str, String str2, boolean z) {
com.iqiyi.passportsdk.interflow.core.b bVar = new com.iqiyi.passportsdk.interflow.core.b();
bVar.a = str2;
a.put(str, bVar);
m(b());
if (z) {
f6862b.put(str, bVar);
n(c());
}
}
private static JSONArray b() {
d.b.a<String, com.iqiyi.passportsdk.interflow.core.b> aVar = a;
if (aVar.size() <= 0) {
return null;
}
JSONArray jSONArray = new JSONArray();
for (Map.Entry<String, com.iqiyi.passportsdk.interflow.core.b> entry : aVar.entrySet()) {
if (entry != null) {
JSONObject jSONObject = new JSONObject();
com.iqiyi.passportsdk.interflow.core.b value = entry.getValue();
try {
jSONObject.put("pkgName", entry.getKey());
jSONObject.put("apkSign", value.a);
jSONArray.put(jSONObject);
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", "callers2JsonArray:%s", e2.getMessage());
}
}
}
return jSONArray;
}
private static JSONArray c() {
d.b.a<String, com.iqiyi.passportsdk.interflow.core.b> aVar = f6862b;
if (aVar.size() <= 0) {
return null;
}
JSONArray jSONArray = new JSONArray();
for (Map.Entry<String, com.iqiyi.passportsdk.interflow.core.b> entry : aVar.entrySet()) {
if (entry != null) {
JSONObject jSONObject = new JSONObject();
com.iqiyi.passportsdk.interflow.core.b value = entry.getValue();
try {
jSONObject.put("pkgName", entry.getKey());
jSONObject.put("apkSign", value.a);
jSONArray.put(jSONObject);
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", "callers2JsonArrayForGame callers2JsonArray:%s", e2.getMessage());
}
}
}
return jSONArray;
}
public static boolean d(Context context, String str) {
if (h()) {
return true;
}
com.iqiyi.passportsdk.interflow.core.b bVar = e().get(str);
if (bVar == null || k.h0(bVar.a)) {
return false;
}
return bVar.a.equals(g(context, str));
}
public static LinkedHashMap<String, com.iqiyi.passportsdk.interflow.core.b> e() {
LinkedHashMap<String, com.iqiyi.passportsdk.interflow.core.b> linkedHashMap = f6863c;
if (com.qiyi.baselib.b.a.a(linkedHashMap)) {
t(null);
if (com.qiyi.baselib.b.a.a(linkedHashMap)) {
try {
t(new JSONArray("[{\"pkgName\":\"com.qiyi.video\",\"appIcon\":\"http://pic1.iqiyipic.com/lequ/20210323/7747e440fbfd4d48968e5ec1c60cb48b.png\",\"agenttype\":21,\"apkSign\":\"846b46b26f2d9572124e4cfd778e8774\",\"appName\":\"爱奇艺\",\"miniVersion\":\"12.3.5\"},{\"pkgName\":\"com.iqiyi.passportsdkdemo\",\"appIcon\":\"http://pic0.iqiyipic.com/common/20170510/icon_pps_184.png\",\"agenttype\":322,\"apkSign\":\"ef2899855685e0acf8376b0e45cf1958\",\"appName\":\"爱奇艺demo\",\"miniVersion\":\"11.9.0\"},{\"pkgName\":\"com.qiyi.video.lite\",\"appIcon\":\"http://pic3.iqiyipic.com/lequ/20210319/3e6605dfc08a49968b89c240095bd87b.png\",\"agenttype\":541,\"apkSign\":\"846b46b26f2d9572124e4cfd778e8774\",\"appName\":\"爱奇艺极速版\",\"miniVersion\":\"1.4.5\"},{\"pkgName\":\"tv.pps.mobile\",\"appIcon\":\"http://pic3.iqiyipic.com/lequ/20210319/42aa4fad26184fe78525ca0742b83c25.png\",\"agenttype\":33,\"apkSign\":\"79a4816c58b11ba96e85524a7d5cf697\",\"appName\":\"爱奇艺随刻\",\"miniVersion\":\"10.0\"},{\"pkgName\":\"com.qiyi.video.child\",\"appIcon\":\"http://pic0.iqiyipic.com/lequ/20210319/eb25d747bb4d4d65abb1967ba203d85b.jpg\",\"agenttype\":163,\"apkSign\":\"846b46b26f2d9572124e4cfd778e8774\",\"appName\":\"爱奇艺奇巴布\",\"miniVersion\":\"11.5.0\"},{\"pkgName\":\"com.iqiyi.acg\",\"appIcon\":\"http://pic1.iqiyipic.com/lequ/20210319/9d31046a2775413cb3a4bbb1149450b2.png\",\"agenttype\":204,\"apkSign\":\"a3943198db8677b0b3ae4d3ba8b30540\",\"appName\":\"叭嗒\",\"miniVersion\":\"4.0.5\"},{\"pkgName\":\"com.iqiyi.comic\",\"appIcon\":\"http://pic1.iqiyipic.com/lequ/20210319/f074f5eda02245ccab3aea70e12d40d6.png\",\"agenttype\":354,\"apkSign\":\"a3943198db8677b0b3ae4d3ba8b30540\",\"appName\":\"爱奇艺漫画\",\"miniVersion\":\"2.0.1\"},{\"pkgName\":\"com.qiyi.video.reader\",\"appIcon\":\"http://pic0.iqiyipic.com/lequ/20210319/8764a88ce9dd4ea99d27ef32e1bd8e34.png\",\"agenttype\":257,\"apkSign\":\"62d882bc3ac45d147b9e57755654d80a\",\"appName\":\"爱奇艺小说\",\"miniVersion\":\"4.4.5\"},{\"pkgName\":\"com.iqiyi.paopao\",\"appIcon\":\"http://pic3.iqiyipic.com/lequ/20210319/90671117fb384ea1a751f738d2fa7f95.png\",\"agenttype\":267,\"apkSign\":\"846b46b26f2d9572124e4cfd778e8774\",\"appName\":\"爱奇艺泡泡\",\"miniVersion\":\"1.14.1\"},{\"pkgName\":\"com.iqiyi.mall.fanfan\",\"appIcon\":\"http://pic2.iqiyipic.com/lequ/20210319/f0b8605c77314515ae0c7bb12fdcf583.png\",\"agenttype\":346,\"apkSign\":\"a79ad0d0b0c9b34f637c60812aa8c732\",\"appName\":\"饭饭星球\",\"miniVersion\":\"2.2.0\"},{\"pkgName\":\"com.qiyi.game.live\",\"appIcon\":\"http://pic1.iqiyipic.com/lequ/20210319/fc66f1fc75604994b30fbe914484d29c.png\",\"agenttype\":240,\"apkSign\":\"0b16ae549f7b4530824d4f0be34801d1\",\"appName\":\"爱奇艺播播机\",\"miniVersion\":\"5.5.0\"},{\"pkgName\":\"com.iqiyi.qixiu\",\"appIcon\":\"http://pic0.iqiyipic.com/lequ/20210319/61b9a5026e594cdfaceceb5ffc0b6e99.png\",\"agenttype\":122,\"apkSign\":\"3f8c69484903f2ccba384761e720d989\",\"appName\":\"奇秀\",\"miniVersion\":\"6.4\"},{\"pkgName\":\"com.iqiyi.ivrcinema.cb\",\"appIcon\":\"http://pic3.iqiyipic.com/lequ/20210319/efbe4ca0fec9434bac8e522f45577f28.png\",\"agenttype\":476,\"apkSign\":\"b64c71265f2a0bcecd97054406121916\",\"appName\":\"爱奇艺VR\",\"miniVersion\":\"6.12.2\"},{\"pkgName\":\"tv.tvguo.androidphone\",\"appIcon\":\"http://pic3.iqiyipic.com/lequ/20210319/91c6686ca74f4160960988a31a22beef.png\",\"agenttype\":187,\"apkSign\":\"22217eca0a0210a272e0ae8057eaacff\",\"appName\":\"电视果\",\"miniVersion\":\"6.13.0\"},{\"pkgName\":\"com.iqiyi.jiandan\",\"appIcon\":\"http://pic1.iqiyipic.com/lequ/20210319/4fbd5b95e8594c48915fd9689c13eb5d.png\",\"agenttype\":454,\"apkSign\":\"499ffebb6b759d7c8b1498f566238bde\",\"appName\":\"随刻创作\",\"miniVersion\":\"2.5.0\"},{\"pkgName\":\"com.qiyi.bianzhi.disney\",\"appIcon\":\"https://pic2.iqiyipic.com/lequ/20210525/99390178b67740f3acc170a340ebd537.png\",\"agenttype\":566,\"apkSign\":\"d347dd04c4e99015a7cf2fa15cb41165\",\"appName\":\"爱奇艺教育\",\"miniVersion\":\"1.0.0\"}]"));
} catch (JSONException e2) {
e2.printStackTrace();
}
}
}
return f6863c;
}
public static com.iqiyi.passportsdk.interflow.core.b f(String str) {
return a.get(str);
}
public static String g(Context context, String str) {
try {
Signature[] signatureArr = context.getPackageManager().getPackageInfo(str, 64).signatures;
if (signatureArr == null || signatureArr.length <= 0) {
return null;
}
return l(signatureArr[0].toByteArray());
} catch (PackageManager.NameNotFoundException e2) {
com.iqiyi.psdk.base.j.a.b("SignChecker: ", e2);
return null;
}
}
public static boolean h() {
return f6864d;
}
public static void i() {
String a2 = com.iqiyi.psdk.base.f.a.a("INTERFLOW_KEY_AUTHORIZED_CALLERS", null);
if (!k.h0(a2)) {
try {
String c2 = a.c(a2);
if (k.h0(c2)) {
return;
}
JSONArray jSONArray = new JSONArray(c2);
JSONArray k2 = k("INTERFLOW_KEY_AUTHORIZED_CALLERS_FOR_GAME");
if (k2 != null && k2.length() > 0) {
for (int i2 = 0; i2 < k2.length(); i2++) {
jSONArray.put(com.iqiyi.passportsdk.utils.k.k(k2, i2));
}
}
r(jSONArray);
com.iqiyi.psdk.base.j.b.a("SignChecker: ", "loadAuthorizedCallers success");
return;
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", "loadAuthorizedCallers:%s", e2.getMessage());
return;
}
}
com.iqiyi.psdk.base.j.b.a("SignChecker: ", "loadAuthorizedCallers failed , local disk cache is empty");
}
private static JSONArray j() {
String a2 = com.iqiyi.psdk.base.f.a.a("INTERFLOW_KEY_AUTHORIZED_LIST", null);
if (!k.h0(a2)) {
try {
String c2 = a.c(a2);
if (k.h0(c2)) {
return null;
}
JSONArray jSONArray = new JSONArray(c2);
com.iqiyi.psdk.base.j.b.a("SignChecker: ", "app auth list load success");
return jSONArray;
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", "app auth list load:%s", e2.getMessage());
}
} else {
com.iqiyi.psdk.base.j.b.a("SignChecker: ", "app auth list load failed , local disk cache is empty");
}
return null;
}
private static JSONArray k(String str) {
String a2 = com.iqiyi.psdk.base.f.a.a(str, null);
if (!k.h0(a2)) {
try {
String c2 = a.c(a2);
if (k.h0(c2)) {
return null;
}
JSONArray jSONArray = new JSONArray(c2);
s(jSONArray);
com.iqiyi.psdk.base.j.b.a("SignChecker: ", str + " load success");
return jSONArray;
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", str + " load:%s", e2.getMessage());
}
} else {
com.iqiyi.psdk.base.j.b.a("SignChecker: ", str + " load failed , local disk cache is empty");
}
return null;
}
private static String l(byte[] bArr) {
try {
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
messageDigest.reset();
messageDigest.update(bArr);
byte[] digest = messageDigest.digest();
StringBuilder sb = new StringBuilder();
for (int i2 = 0; i2 < digest.length; i2++) {
if (Integer.toHexString(digest[i2] & 255).length() == 1) {
sb.append("0");
sb.append(Integer.toHexString(digest[i2] & 255));
} else {
sb.append(Integer.toHexString(digest[i2] & 255));
}
}
return sb.toString();
} catch (NoSuchAlgorithmException e2) {
com.iqiyi.psdk.base.j.a.b("SignChecker: ", e2);
return null;
}
}
private static void m(JSONArray jSONArray) {
if (jSONArray == null) {
return;
}
com.iqiyi.psdk.base.f.a.h("INTERFLOW_KEY_AUTHORIZED_CALLERS", a.e(jSONArray.toString()));
}
private static void n(JSONArray jSONArray) {
if (jSONArray == null) {
return;
}
com.iqiyi.psdk.base.f.a.h("INTERFLOW_KEY_AUTHORIZED_CALLERS_FOR_GAME", a.e(jSONArray.toString()));
}
private static void o(JSONArray jSONArray) {
if (jSONArray == null) {
return;
}
com.iqiyi.psdk.base.f.a.h("INTERFLOW_KEY_AUTHORIZED_LIST", a.e(jSONArray.toString()));
}
private static synchronized void p(JSONArray jSONArray) {
synchronized (c.class) {
if (jSONArray != null) {
if (jSONArray.length() != 0) {
f6863c.clear();
for (int i2 = 0; i2 < jSONArray.length(); i2++) {
JSONObject jSONObject = null;
try {
jSONObject = jSONArray.getJSONObject(i2);
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", "setAuthorizedListToMemory:%s", e2.getMessage());
}
if (jSONObject != null) {
String optString = jSONObject.optString("pkgName");
String optString2 = jSONObject.optString("appIcon");
String optString3 = jSONObject.optString("apkSign");
String optString4 = jSONObject.optString("appName");
String optString5 = jSONObject.optString("miniVersion");
String optString6 = jSONObject.optString("agenttype");
com.iqiyi.passportsdk.interflow.core.b bVar = new com.iqiyi.passportsdk.interflow.core.b();
bVar.f6707b = optString2;
bVar.a = optString3;
bVar.f6708c = optString;
bVar.f6709d = optString4;
bVar.f6710e = optString5;
bVar.f6711f = optString6;
f6863c.put(optString, bVar);
}
}
}
}
}
}
public static void q(JSONArray jSONArray) {
JSONArray k2 = k("INTERFLOW_KEY_AUTHORIZED_CALLERS_FOR_GAME");
if (k2 != null && k2.length() > 0) {
for (int i2 = 0; i2 < k2.length(); i2++) {
jSONArray.put(com.iqiyi.passportsdk.utils.k.k(k2, i2));
}
}
r(jSONArray);
m(jSONArray);
}
private static synchronized void r(JSONArray jSONArray) {
synchronized (c.class) {
if (jSONArray == null) {
return;
}
a.clear();
if (jSONArray.length() == 0) {
return;
}
for (int i2 = 0; i2 < jSONArray.length(); i2++) {
JSONObject jSONObject = null;
try {
jSONObject = jSONArray.getJSONObject(i2);
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", "setAuthorizedCallersToMemory:%s", e2.getMessage());
}
if (jSONObject != null) {
String optString = jSONObject.optString("pkgName");
String optString2 = jSONObject.optString("appIcon");
String optString3 = jSONObject.optString("apkSign");
com.iqiyi.passportsdk.interflow.core.b bVar = new com.iqiyi.passportsdk.interflow.core.b();
bVar.f6707b = optString2;
bVar.a = optString3;
a.put(optString, bVar);
}
}
}
}
private static void s(JSONArray jSONArray) {
if (jSONArray == null) {
return;
}
f6862b.clear();
if (jSONArray.length() == 0) {
return;
}
for (int i2 = 0; i2 < jSONArray.length(); i2++) {
JSONObject jSONObject = null;
try {
jSONObject = jSONArray.getJSONObject(i2);
} catch (JSONException e2) {
com.iqiyi.psdk.base.j.b.b("SignChecker: ", "setAuthorizedCallersToMemoryForGame:%s", e2.getMessage());
}
if (jSONObject != null) {
String optString = jSONObject.optString("pkgName");
String optString2 = jSONObject.optString("appIcon");
String optString3 = jSONObject.optString("apkSign");
com.iqiyi.passportsdk.interflow.core.b bVar = new com.iqiyi.passportsdk.interflow.core.b();
bVar.f6707b = optString2;
bVar.a = optString3;
f6862b.put(optString, bVar);
}
}
}
public static void t(JSONArray jSONArray) {
if (jSONArray != null && jSONArray.length() > 0) {
o(jSONArray);
}
p(j());
}
public static void u(boolean z) {
f6864d = z;
}
}