正在查看: 用信花 v1.1.3 应用的 j0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 用信花 v1.1.3 应用的 j0.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package e2;
import android.content.Context;
import android.content.SharedPreferences;
import android.text.TextUtils;
import android.util.Base64;
import androidx.exifinterface.media.ExifInterface;
import com.duoshan.loan.base.BaseApplication;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class j0 {
public static String f3632a = "MY_APP";
public static String f3633b = "Authorization";
public static String f3634c = "splas_agreement";
public static String f3635d = "user_info";
public static String f3636e = "loan_hide";
public static String f3637f = "is_identity_auth";
public static String f3638g = "city";
public static String f3639h = "put_away";
public static String f3640i = "user_phone";
public static String f3641j = "phone_oaid";
public static String f3642k = "user_status";
public static String f3643l = "time_update_click_next";
public static String f3644m = "time_credit_click_next";
public static String f3645n = "record_withdraw_list";
public static String f3646o = "append_record_withdraw";
public static String f3647p = "";
public static String f3648q = "";
public class a<T> extends x3.a<List<T>> {
}
public static void A(Context context, String str, String str2, boolean z4) {
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putBoolean(str2, z4);
edit.apply();
}
public static void B(String str, String str2, boolean z4) {
SharedPreferences.Editor edit = BaseApplication.a().getSharedPreferences(str, 0).edit();
edit.putBoolean(str2, z4);
edit.apply();
}
public static void C(String str, boolean z4) {
SharedPreferences.Editor edit = BaseApplication.a().getSharedPreferences(f3632a, 0).edit();
edit.putBoolean(str, z4);
edit.apply();
}
public static void D(Context context, String str, String str2, float f4) {
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putFloat(str2, f4);
edit.apply();
}
public static void E(Context context, String str, int i4) {
SharedPreferences.Editor edit = context.getSharedPreferences(f3632a, 0).edit();
edit.putInt(str, i4);
edit.apply();
}
public static void F(Context context, String str, String str2, int i4) {
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putInt(str2, i4);
edit.apply();
}
public static void G(String str, int i4) {
SharedPreferences.Editor edit = BaseApplication.a().getSharedPreferences(f3632a, 0).edit();
edit.putInt(str, i4);
edit.apply();
}
public static void H(Context context, String str, String str2, long j4) {
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putLong(str2, j4);
edit.apply();
}
public static void I(Context context, String str, String str2, String str3) {
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.putString(str2, str3);
edit.apply();
}
public static void J(String str, String str2) {
SharedPreferences.Editor edit = BaseApplication.a().getSharedPreferences(f3632a, 0).edit();
edit.putString(str, str2);
edit.apply();
}
public static void K(String str, Set<String> set) {
SharedPreferences.Editor edit = BaseApplication.a().getSharedPreferences(f3632a, 0).edit();
edit.putStringSet(str, set);
edit.apply();
}
public static void L(String str) {
J("USER_NAME", str);
}
public static void M(Context context, String str) {
SharedPreferences.Editor edit = context.getSharedPreferences(f3632a, 0).edit();
edit.remove(str);
edit.apply();
}
public static void N(Context context, String str, String str2) {
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.remove(str2);
edit.apply();
}
public static void O(String str) {
I(BaseApplication.a(), f3632a, f3633b, str);
}
public static void P(String str, Object obj) {
SharedPreferences.Editor edit = BaseApplication.a().getSharedPreferences(f3632a, 0).edit();
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
new ObjectOutputStream(byteArrayOutputStream).writeObject(obj);
edit.putString(str, b(byteArrayOutputStream.toByteArray()));
edit.commit();
} catch (IOException e4) {
e4.printStackTrace();
}
}
public static <T> void Q(String str, String str2, List<T> list) {
if (list == null || list.size() <= 0) {
return;
}
SharedPreferences.Editor edit = BaseApplication.a().getSharedPreferences(str, 0).edit();
String y4 = new r3.f().y(list);
edit.clear();
edit.putString(str2, y4);
edit.commit();
}
public static byte[] a(String str) {
int i4;
int i5;
String trim = str.toUpperCase().trim();
if (trim.length() % 2 != 0) {
return null;
}
byte[] bArr = new byte[trim.length() / 2];
int i6 = 0;
while (i6 < trim.length()) {
char charAt = trim.charAt(i6);
if (charAt < '0' || charAt > '9') {
if (charAt >= 'A' && charAt <= 'F') {
i4 = charAt - '7';
}
return null;
}
i4 = charAt - '0';
int i7 = i4 * 16;
int i8 = i6 + 1;
char charAt2 = trim.charAt(i8);
if (charAt2 < '0' || charAt2 > '9') {
if (charAt2 >= 'A' && charAt2 <= 'F') {
i5 = charAt2 - '7';
}
return null;
}
i5 = charAt2 - '0';
bArr[i8 / 2] = (byte) (i7 + i5);
i6 = i8 + 1;
}
return bArr;
}
public static String b(byte[] bArr) {
if (bArr == null) {
return null;
}
if (bArr.length == 0) {
return "";
}
StringBuffer stringBuffer = new StringBuffer(bArr.length);
for (byte b4 : bArr) {
String hexString = Integer.toHexString(b4 & ExifInterface.MARKER);
if (hexString.length() < 2) {
stringBuffer.append(0);
}
stringBuffer.append(hexString.toUpperCase());
}
return stringBuffer.toString();
}
public static void c(Context context) {
SharedPreferences.Editor edit = context.getSharedPreferences(f3632a, 0).edit();
edit.clear();
edit.apply();
}
public static void d(Context context, String str) {
SharedPreferences.Editor edit = context.getSharedPreferences(str, 0).edit();
edit.clear();
edit.apply();
}
public static Map<String, ?> e(Context context, String str) {
return context.getSharedPreferences(str, 0).getAll();
}
public static String f() {
return s(BaseApplication.a(), f3633b, "");
}
public static <T> T g(Context context, String str, String str2, Class<T> cls) {
String t4 = t(context, str, str2, null);
if (TextUtils.isEmpty(t4)) {
return null;
}
try {
return (T) new r3.f().k(new String(Base64.decode(t4, 0)), cls);
} catch (Exception unused) {
return null;
}
}
public static <T> T h(String str, Class<T> cls) {
String t4 = t(BaseApplication.a(), f3632a, str, null);
if (TextUtils.isEmpty(t4)) {
return null;
}
try {
return (T) new r3.f().k(new String(Base64.decode(t4, 0)), cls);
} catch (Exception unused) {
return null;
}
}
public static boolean i(Context context, String str, String str2, boolean z4) {
return context.getSharedPreferences(str, 0).getBoolean(str2, z4);
}
public static boolean j(String str, boolean z4) {
return BaseApplication.a().getSharedPreferences(f3632a, 0).getBoolean(str, z4);
}
public static <T> List<T> k(String str, String str2) {
SharedPreferences sharedPreferences = BaseApplication.a().getSharedPreferences(str, 0);
sharedPreferences.edit();
ArrayList arrayList = new ArrayList();
String string = sharedPreferences.getString(str2, null);
return string == null ? arrayList : (List) new r3.f().l(string, new a().h());
}
public static float l(Context context, String str, String str2, float f4) {
return context.getSharedPreferences(str, 0).getFloat(str2, f4);
}
public static int m(Context context, String str, int i4) {
return context.getSharedPreferences(f3632a, 0).getInt(str, i4);
}
public static int n(Context context, String str, String str2, int i4) {
return context.getSharedPreferences(str, 0).getInt(str2, i4);
}
public static int o(String str, int i4) {
return BaseApplication.a().getSharedPreferences(f3632a, 0).getInt(str, i4);
}
public static long p(Context context, String str, String str2, long j4) {
return context.getSharedPreferences(str, 0).getLong(str2, j4);
}
public static SharedPreferences.Editor q(Context context) {
return context.getSharedPreferences(f3632a, 0).edit();
}
public static Object r(String str) {
SharedPreferences sharedPreferences = BaseApplication.a().getSharedPreferences(f3632a, 0);
if (sharedPreferences.contains(str)) {
String string = sharedPreferences.getString(str, "");
if (TextUtils.isEmpty(string)) {
return null;
}
try {
return new ObjectInputStream(new ByteArrayInputStream(a(string))).readObject();
} catch (IOException e4) {
e4.printStackTrace();
} catch (ClassNotFoundException e5) {
e5.printStackTrace();
}
}
return null;
}
public static String s(Context context, String str, String str2) {
return context.getSharedPreferences(f3632a, 0).getString(str, str2);
}
public static String t(Context context, String str, String str2, String str3) {
return context.getSharedPreferences(str, 0).getString(str2, str3);
}
public static String u(String str, String str2) {
return BaseApplication.a().getSharedPreferences(f3632a, 0).getString(str, str2);
}
public static Set<String> v(String str) {
return BaseApplication.a().getSharedPreferences(f3632a, 0).getStringSet(str, null);
}
public static String w() {
return u("USER_NAME", "");
}
public static void x(String str, String str2) {
f3647p = String.format("%s_%s", str, str2);
f3648q = String.format("%s_", str2);
}
public static void y(Context context, String str, String str2, Object obj) {
if (obj == null) {
I(context, str, str2, "");
} else {
I(context, str, str2, Base64.encodeToString(new r3.f().y(obj).getBytes(), 0));
}
}
public static void z(String str, Object obj) {
if (obj == null) {
I(BaseApplication.a(), f3632a, str, "");
} else {
I(BaseApplication.a(), f3632a, str, Base64.encodeToString(new r3.f().y(obj).getBytes(), 0));
}
}
}