Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 g.java 源代码,内容仅作参考
package e30;
import android.os.Build;
import androidx.annotation.ChecksSdkIntAtLeast;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.yandex.authsdk.YandexAuthLoginOptions;
import com.yandex.authsdk.YandexAuthOptions;
import e80.b0;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Locale;
import kotlin.Metadata;
import kotlin.jvm.internal.s;
import kotlin.jvm.internal.t0;
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\b\u0018\u0000 \n2\u00020\u0001:\u0001\nB\u0007¢\u0006\u0004\b\f\u0010\rJ\u001e\u0010\b\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006J\u000e\u0010\t\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u0002J\u0010\u0010\n\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0010\u0010\u000b\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u0002H\u0002¨\u0006\u000e"}, d2 = {"Le30/g;", "", "Lcom/yandex/authsdk/YandexAuthOptions;", "options", "Lcom/yandex/authsdk/YandexAuthLoginOptions;", "loginOptions", "", "state", "d", "b", "a", "c", "<init>", "()V", "lib_release"}, k = 1, mv = {1, 6, 0})
public final class g {
@ChecksSdkIntAtLeast(api = 23)
public static final boolean f74540b;
static {
boolean z11;
if (Build.VERSION.SDK_INT >= 23) {
z11 = true;
} else {
z11 = false;
}
f74540b = z11;
}
public final String a(YandexAuthOptions options) throws UnsupportedEncodingException {
String encode = URLEncoder.encode(b(options), C.UTF8_NAME);
s.i(encode, "encode(createRedirectUrl(options), \"UTF-8\")");
return encode;
}
public final String b(YandexAuthOptions options) {
s.j(options, "options");
if (f74540b) {
t0 t0Var = t0.f82529a;
String format = String.format("https://yx%s.%s/auth/finish?platform=android", Arrays.copyOf(new Object[]{options.getClientId(), options.getOauthHost()}, 2));
s.i(format, "format(format, *args)");
return format;
}
t0 t0Var2 = t0.f82529a;
String format2 = String.format("yx%s:///auth/finish?platform=android", Arrays.copyOf(new Object[]{options.getClientId()}, 1));
s.i(format2, "format(format, *args)");
return format2;
}
public final String c(YandexAuthOptions options) {
String a11 = c.a(options.getOauthHost(), Locale.getDefault());
s.i(a11, "getLocalizedHost(options…ost, Locale.getDefault())");
return a11;
}
public final String d(YandexAuthOptions options, YandexAuthLoginOptions loginOptions, String state) {
boolean z11;
s.j(options, "options");
s.j(loginOptions, "loginOptions");
s.j(state, "state");
String a11 = a(options);
t0 t0Var = t0.f82529a;
boolean z12 = false;
String format = String.format("https://%s/authorize?response_type=token&client_id=%s&redirect_uri=%s&state=%s&force_confirm=true&origin=yandex_auth_sdk_android", Arrays.copyOf(new Object[]{c(options), options.getClientId(), a11, state}, 4));
s.i(format, "format(format, *args)");
StringBuilder sb2 = new StringBuilder(format);
if (loginOptions.getLoginHint() != null) {
sb2.append(s.s("&login_hint=", loginOptions.getLoginHint()));
}
ArrayList<String> g11 = loginOptions.g();
if (g11 != null && !g11.isEmpty()) {
z11 = false;
} else {
z11 = true;
}
if (!z11) {
sb2.append(s.s("&scope=", b0.C0(loginOptions.g(), " ", null, null, 0, null, null, 62, null)));
}
ArrayList<String> e11 = loginOptions.e();
if (e11 == null || e11.isEmpty()) {
z12 = true;
}
if (!z12) {
sb2.append(s.s("&optional_scope=", b0.C0(loginOptions.e(), " ", null, null, 0, null, null, 62, null)));
}
String sb3 = sb2.toString();
s.i(sb3, "String.format(\n …}\n .toString()");
return sb3;
}
}