Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 AFc1cSDK.java 源代码,内容仅作参考
package com.appsflyer.internal;
import android.util.Base64;
import com.appsflyer.AFLogger;
import com.tapjoy.TJAdUnitConstants;
import java.security.MessageDigest;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import kotlin.Metadata;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.t0;
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\b\b\u0016\u0018\u0000 \u00162\u00020\u0001:\u0001\u0016B\u0017\u0012\u0006\u0010\u0012\u001a\u00020\u0002\u0012\u0006\u0010\u0013\u001a\u00020\u0006¢\u0006\u0004\b\u0014\u0010\u0015R\u0014\u0010\u0005\u001a\u00020\u00028\u0002X\u0083\u0004¢\u0006\u0006\n\u0004\b\u0003\u0010\u0004R\u0014\u0010\b\u001a\u00020\u00068\u0002X\u0083\u0004¢\u0006\u0006\n\u0004\b\u0005\u0010\u0007R\u0013\u0010\u0003\u001a\u00020\tX\u0083\u0080\u0002¢\u0006\u0006\n\u0004\b\n\u0010\u000bR\u0013\u0010\r\u001a\u00020\tX\u0083\u0080\u0002¢\u0006\u0006\n\u0004\b\f\u0010\u000bR\u0014\u0010\u000f\u001a\u00020\u000e8CX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\n\u001a\u00020\t8G¢\u0006\u0006\u001a\u0004\b\f\u0010\u0011R\u0011\u0010\f\u001a\u00020\t8G¢\u0006\u0006\u001a\u0004\b\r\u0010\u0011"}, d2 = {"Lcom/appsflyer/internal/AFc1cSDK;", "", "Lcom/appsflyer/internal/AFc1ySDK;", "AFInAppEventType", "Lcom/appsflyer/internal/AFc1ySDK;", TJAdUnitConstants.String.USAGE_TRACKER_VALUES, "Lcom/appsflyer/internal/AFb1dSDK;", "Lcom/appsflyer/internal/AFb1dSDK;", "afInfoLog", "", "AFLogger", "Ld80/j;", "valueOf", "AFKeystoreWrapper", "", "AFInAppEventParameterName", "()Z", "()Ljava/lang/String;", "p0", "p1", "<init>", "(Lcom/appsflyer/internal/AFc1ySDK;Lcom/appsflyer/internal/AFb1dSDK;)V", "AFa1ySDK"}, k = 1, mv = {1, 6, 0})
public class AFc1cSDK {
private static AFd1zSDK afDebugLog;
private final AFc1ySDK values;
private final d80.j AFInAppEventType;
public final d80.j AFKeystoreWrapper;
private final AFb1dSDK afInfoLog;
public static final Companion INSTANCE = new Companion(null);
public static String AFInAppEventParameterName = "https://%scdn-%ssettings.%s/android/v1/%s/settings";
public static String AFKeystoreWrapper = "https://%scdn-%stestsettings.%s/android/v1/%s/settings";
private static final List<String> afRDLog = e80.t.p("googleplay", "playstore", "googleplaystore");
@Metadata(d1 = {"\u0000\b\n\u0002\u0010\u000e\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\u000b¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"", TJAdUnitConstants.String.USAGE_TRACKER_VALUES, "()Ljava/lang/String;"}, k = 3, mv = {1, 6, 0}, xi = 48)
public static final class AnonymousClass1 extends kotlin.jvm.internal.u implements Function0<String> {
public AnonymousClass1() {
super(0);
}
@Override
public final String invoke() {
boolean z11;
String AFInAppEventParameterName = AFa1dSDK.AFInAppEventParameterName(AFc1cSDK.this.afInfoLog, AFc1cSDK.this.values.AFKeystoreWrapper());
if (AFInAppEventParameterName != null && !a90.r.D(AFInAppEventParameterName)) {
z11 = false;
} else {
z11 = true;
}
String str = "";
if (!z11) {
String obj = a90.s.j1(AFInAppEventParameterName).toString();
List<String> valueOf = Companion.valueOf();
Locale locale = Locale.getDefault();
kotlin.jvm.internal.s.i(locale, "");
String lowerCase = obj.toLowerCase(locale);
kotlin.jvm.internal.s.i(lowerCase, "");
if (!valueOf.contains(lowerCase)) {
AFInAppEventParameterName = "-".concat(obj);
} else {
t0 t0Var = t0.f82529a;
String format = String.format("AF detected using redundant Google-Play channel for attribution - %s. Using without channel postfix.", Arrays.copyOf(new Object[]{obj}, 1));
kotlin.jvm.internal.s.i(format, "");
AFLogger.afWarnLog(format);
AFInAppEventParameterName = "";
}
}
if (AFInAppEventParameterName != null) {
str = AFInAppEventParameterName;
}
return a90.s.j1(str).toString();
}
}
@Metadata(d1 = {"\u0000\b\n\u0002\u0010\u000e\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\u000b¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"", "AFInAppEventParameterName", "()Ljava/lang/String;"}, k = 3, mv = {1, 6, 0}, xi = 48)
public static final class AnonymousClass3 extends kotlin.jvm.internal.u implements Function0<String> {
public AnonymousClass3() {
super(0);
}
@Override
public final String invoke() {
String packageName = AFc1cSDK.this.values.AFInAppEventType.AFKeystoreWrapper.getPackageName();
kotlin.jvm.internal.s.i(packageName, "");
return AFc1cSDK.AFInAppEventType(packageName, AFc1cSDK.AFInAppEventParameterName(AFc1cSDK.this));
}
}
public class AFa1xSDK {
public static final int[] AFKeystoreWrapper;
static {
int[] iArr = new int[AFc1bSDK.values().length];
iArr[AFc1bSDK.DEFAULT.ordinal()] = 1;
iArr[AFc1bSDK.API.ordinal()] = 2;
iArr[AFc1bSDK.RC.ordinal()] = 3;
AFKeystoreWrapper = iArr;
}
}
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0000\b\u0086\u0003\u0018\u00002\u00020\u0011B\t\b\u0002¢\u0006\u0004\b\u000f\u0010\u0010R \u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\u00020\u00018\u0007X\u0087\u0004¢\u0006\f\n\u0004\b\u0003\u0010\u0004\u001a\u0004\b\u0005\u0010\u0006R\u0012\u0010\u0005\u001a\u00020\u0002X\u0087\u0002¢\u0006\u0006\n\u0004\b\u0007\u0010\bR\u0012\u0010\n\u001a\u00020\u0002X\u0087\u0002¢\u0006\u0006\n\u0004\b\t\u0010\bR\u001c\u0010\t\u001a\u0004\u0018\u00010\u000b@\u0007X\u0087\n¢\u0006\f\n\u0004\b\f\u0010\r\"\u0004\b\t\u0010\u000e"}, d2 = {"Lcom/appsflyer/internal/AFc1cSDK$AFa1ySDK;", "", "", "afRDLog", "Ljava/util/List;", "valueOf", "()Ljava/util/List;", "AFInAppEventParameterName", "Ljava/lang/String;", "AFKeystoreWrapper", "AFInAppEventType", "Lcom/appsflyer/internal/AFd1zSDK;", "afDebugLog", "Lcom/appsflyer/internal/AFd1zSDK;", "(Lcom/appsflyer/internal/AFd1zSDK;)V", "<init>", "()V", ""}, k = 1, mv = {1, 6, 0}, xi = 48)
public static final class Companion {
private Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public static void AFKeystoreWrapper(AFd1zSDK aFd1zSDK) {
AFc1cSDK.afDebugLog = aFd1zSDK;
}
public static List<String> valueOf() {
return AFc1cSDK.afRDLog;
}
}
public AFc1cSDK(AFc1ySDK aFc1ySDK, AFb1dSDK aFb1dSDK) {
kotlin.jvm.internal.s.j(aFc1ySDK, "");
kotlin.jvm.internal.s.j(aFb1dSDK, "");
this.values = aFc1ySDK;
this.afInfoLog = aFb1dSDK;
this.AFInAppEventType = d80.k.b(new AnonymousClass1());
this.AFKeystoreWrapper = d80.k.b(new AnonymousClass3());
}
public static final String AFInAppEventType(String str, String str2) {
StringBuilder sb2 = new StringBuilder();
StringBuilder sb3 = new StringBuilder();
sb3.append(str);
sb3.append(str2);
String obj = sb3.toString();
kotlin.jvm.internal.s.j(obj, "");
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
byte[] bytes = obj.getBytes(a90.c.UTF_8);
kotlin.jvm.internal.s.i(bytes, "");
byte[] digest = messageDigest.digest(bytes);
kotlin.jvm.internal.s.i(digest, "");
String encodeToString = Base64.encodeToString(digest, 2);
kotlin.jvm.internal.s.i(encodeToString, "");
String lowerCase = encodeToString.toLowerCase(Locale.ROOT);
kotlin.jvm.internal.s.i(lowerCase, "");
String substring = new a90.g("[^\\w]+").f(lowerCase, "").substring(0, 6);
kotlin.jvm.internal.s.i(substring, "");
sb2.append(substring);
sb2.append('-');
return sb2.toString();
}
public static final void valueOf(AFd1zSDK aFd1zSDK) {
Companion.AFKeystoreWrapper(aFd1zSDK);
}
public static boolean AFInAppEventParameterName() {
return afDebugLog == null;
}
public final String AFKeystoreWrapper() {
AFc1bSDK aFc1bSDK;
if (AFInAppEventParameterName()) {
aFc1bSDK = AFc1bSDK.DEFAULT;
} else {
aFc1bSDK = AFc1bSDK.API;
}
int i11 = AFa1xSDK.AFKeystoreWrapper[aFc1bSDK.ordinal()];
if (i11 == 1) {
return "appsflyersdk.com";
}
if (i11 != 2) {
if (i11 == 3) {
return "";
}
throw new d80.n();
}
AFd1zSDK aFd1zSDK = afDebugLog;
String str = aFd1zSDK != null ? aFd1zSDK.AFInAppEventParameterName : null;
return str == null ? "" : str;
}
public static final String AFInAppEventParameterName(AFc1cSDK aFc1cSDK) {
return (String) aFc1cSDK.AFInAppEventType.getValue();
}
public final String valueOf() {
AFc1bSDK aFc1bSDK;
if (AFInAppEventParameterName()) {
aFc1bSDK = AFc1bSDK.DEFAULT;
} else {
aFc1bSDK = AFc1bSDK.API;
}
int i11 = AFa1xSDK.AFKeystoreWrapper[aFc1bSDK.ordinal()];
if (i11 == 1) {
return (String) this.AFKeystoreWrapper.getValue();
}
if (i11 != 2) {
if (i11 == 3) {
return "";
}
throw new d80.n();
}
AFd1zSDK aFd1zSDK = afDebugLog;
String str = aFd1zSDK != null ? aFd1zSDK.values : null;
return str == null ? "" : str;
}
}