VMOS Pro v2.9.9版本的 MD5 值为:42f292af86d02c1a08555cf2d3982a52
以下内容为反编译后的 TokenMaskManager.java 源代码,内容仅作参考
package com.mobile.auth.gatewayauth.manager;
import android.text.TextUtils;
import android.util.LruCache;
import com.mobile.auth.gatewayauth.annotations.SafeProtector;
import com.mobile.auth.gatewayauth.manager.a;
import com.mobile.auth.gatewayauth.manager.base.Cache;
import com.mobile.auth.gatewayauth.manager.base.CacheKey;
import com.mobile.auth.gatewayauth.model.LoginPhoneInfo;
import com.mobile.auth.gatewayauth.utils.TokenGenerator;
import com.nirvana.tools.cache.CacheHandler;
import com.nirvana.tools.cache.CacheManager;
import com.nirvana.tools.jsoner.JsonType;
import com.nirvana.tools.requestqueue.Callback;
import com.nirvana.tools.requestqueue.strategy.ThreadStrategy;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.json.JSONObject;
public class TokenMaskManager {
private b f49092a;
private SystemManager b;
private d c;
private VendorSdkInfoManager d;
private f e;
private TokenGenerator f;
private com.mobile.auth.l.a g;
private volatile Map<String, LoginPhoneInfo> h = new ConcurrentHashMap();
private volatile Cache<LoginPhoneInfo> i = null;
private volatile LruCache<String, Cache<String>> j = new LruCache<>(10);
private volatile LruCache<String, Cache<String>> k = new LruCache<>(10);
private CacheHandler l;
private CacheHandler m;
private CacheHandler n;
private CacheHandler o;
private CacheManager p;
public class AnonymousClass10 implements RequestCallback<com.mobile.auth.r.d, com.mobile.auth.gatewayauth.manager.base.b> {
public final CacheKey f49094a;
public final String b;
public final RequestCallback c;
public final String d;
public final CacheKey e;
public AnonymousClass10(CacheKey cacheKey, String str, RequestCallback requestCallback, String str2, CacheKey cacheKey2) {
this.f49094a = cacheKey;
this.b = str;
this.c = requestCallback;
this.d = str2;
this.e = cacheKey2;
}
public void a(com.mobile.auth.gatewayauth.manager.base.b bVar) {
if (bVar == null) {
try {
bVar = com.mobile.auth.gatewayauth.manager.base.b.a("600010", "未知异常");
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
return;
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
return;
}
}
}
this.c.onError(bVar);
}
public void a(com.mobile.auth.r.d dVar) {
try {
LoginPhoneInfo build = LoginPhoneInfo.newLoginPhoneInfo().protocolName(dVar.c().e()).protocolUrl(dVar.c().f()).phoneNumber(dVar.c().b()).build();
TokenMaskManager.a(TokenMaskManager.this, this.f49094a, build, this.b);
this.c.onSuccess(com.mobile.auth.gatewayauth.manager.base.b.a().a(false).a(build).a());
dVar.b().a(Math.min(System.currentTimeMillis() + 86400000, dVar.b().f()));
if (TextUtils.isEmpty(dVar.b().d())) {
return;
}
TokenMaskManager.a(TokenMaskManager.this, this.d, this.b, this.e, dVar.b().d(), dVar.b().f());
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onError(com.mobile.auth.gatewayauth.manager.base.b bVar) {
try {
a(bVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onSuccess(com.mobile.auth.r.d dVar) {
try {
a(dVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass11 extends Callback<com.mobile.auth.r.d> {
public final RequestCallback f49095a;
public AnonymousClass11(ThreadStrategy threadStrategy, long j, RequestCallback requestCallback) {
super(threadStrategy, j);
this.f49095a = requestCallback;
}
public void a(com.mobile.auth.r.d dVar) {
try {
if (dVar.a()) {
this.f49095a.onSuccess(dVar);
return;
}
com.mobile.auth.gatewayauth.manager.base.b b = dVar.b();
if (b == null) {
b = com.mobile.auth.gatewayauth.manager.base.b.a("600010", "未知异常");
}
this.f49095a.onError(b);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onResult(com.mobile.auth.r.d dVar) {
try {
a(dVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass12 extends com.mobile.auth.m.d {
public final String f49096a;
public final String b;
public AnonymousClass12(f fVar, String str, long j, String str2, String str3, String str4) {
super(fVar, str, j, str2);
this.f49096a = str3;
this.b = str4;
}
@Override
public void a(RequestCallback requestCallback, a aVar) {
try {
aVar.a(requestCallback, a.b.a().a(this.f49096a).b(this.b).a());
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass13 extends Callback<com.mobile.auth.r.d> {
public final String f49097a;
public final String b;
public final CacheKey c;
public final RequestCallback d;
public AnonymousClass13(ThreadStrategy threadStrategy, long j, String str, String str2, CacheKey cacheKey, RequestCallback requestCallback) {
super(threadStrategy, j);
this.f49097a = str;
this.b = str2;
this.c = cacheKey;
this.d = requestCallback;
}
public void a(com.mobile.auth.r.d dVar) {
try {
TokenMaskManager.d(TokenMaskManager.this).a("Update LoginToken from network!");
if (dVar.a()) {
dVar.b().a(Math.min(System.currentTimeMillis() + 86400000, dVar.b().f()));
TokenMaskManager.a(TokenMaskManager.this, this.f49097a, this.b, this.c, dVar.b().d(), dVar.b().f());
this.d.onSuccess("false");
return;
}
com.mobile.auth.gatewayauth.manager.base.b b = dVar.b();
if (b == null) {
b = com.mobile.auth.gatewayauth.manager.base.b.a("600010", "未知异常");
}
this.d.onError(b);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onResult(com.mobile.auth.r.d dVar) {
try {
a(dVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass14 extends com.mobile.auth.m.d {
public final String f49098a;
public final String b;
public AnonymousClass14(f fVar, String str, long j, String str2, String str3, String str4) {
super(fVar, str, j, str2);
this.f49098a = str3;
this.b = str4;
}
@Override
public void a(RequestCallback requestCallback, a aVar) {
try {
aVar.b(requestCallback, a.b.a().a(this.f49098a).b(this.b).a());
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass15 extends Callback<com.mobile.auth.r.d> {
public final String f49099a;
public final RequestCallback b;
public AnonymousClass15(ThreadStrategy threadStrategy, long j, String str, RequestCallback requestCallback) {
super(threadStrategy, j);
this.f49099a = str;
this.b = requestCallback;
}
public void a(com.mobile.auth.r.d dVar) {
try {
TokenMaskManager.d(TokenMaskManager.this).a("Update LoginToken from network!");
if (dVar.a()) {
dVar.b().a(TokenMaskManager.a(TokenMaskManager.this, dVar.b().d(), this.f49099a, true));
this.b.onSuccess(dVar.b());
return;
}
com.mobile.auth.gatewayauth.manager.base.b b = dVar.b();
if (b == null) {
b = com.mobile.auth.gatewayauth.manager.base.b.a("600010", "未知异常");
}
this.b.onError(b);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onResult(com.mobile.auth.r.d dVar) {
try {
a(dVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass16 extends com.mobile.auth.m.d {
public final String f49100a;
public final String b;
public AnonymousClass16(f fVar, String str, long j, String str2, String str3, String str4) {
super(fVar, str, j, str2);
this.f49100a = str3;
this.b = str4;
}
@Override
public void a(RequestCallback requestCallback, a aVar) {
try {
aVar.b(requestCallback, a.b.a().a(this.f49100a).b(this.b).a());
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass2 extends Callback<com.mobile.auth.r.e> {
public final String f49101a;
public final RequestCallback b;
public AnonymousClass2(ThreadStrategy threadStrategy, long j, String str, RequestCallback requestCallback) {
super(threadStrategy, j);
this.f49101a = str;
this.b = requestCallback;
}
public void a(com.mobile.auth.r.e eVar) {
try {
TokenMaskManager.d(TokenMaskManager.this).a("Update VerifyToken from network!");
if (eVar.a()) {
eVar.b().a(TokenMaskManager.a(TokenMaskManager.this, eVar.b().d(), this.f49101a, false));
this.b.onSuccess(eVar.b());
return;
}
com.mobile.auth.gatewayauth.manager.base.b b = eVar.b();
if (b == null) {
b = com.mobile.auth.gatewayauth.manager.base.b.a("600010", "未知异常");
}
this.b.onError(b);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onResult(com.mobile.auth.r.e eVar) {
try {
a(eVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass3 extends Callback<com.mobile.auth.r.e> {
public final String f49102a;
public final String b;
public final CacheKey c;
public final RequestCallback d;
public AnonymousClass3(ThreadStrategy threadStrategy, long j, String str, String str2, CacheKey cacheKey, RequestCallback requestCallback) {
super(threadStrategy, j);
this.f49102a = str;
this.b = str2;
this.c = cacheKey;
this.d = requestCallback;
}
public void a(com.mobile.auth.r.e eVar) {
try {
TokenMaskManager.d(TokenMaskManager.this).a("Update VerifyToken from network!");
if (eVar.a()) {
eVar.b().a(Math.min(System.currentTimeMillis() + 86400000, eVar.b().f()));
TokenMaskManager.b(TokenMaskManager.this, this.f49102a, this.b, this.c, eVar.b().d(), eVar.b().f());
this.d.onSuccess("false");
return;
}
com.mobile.auth.gatewayauth.manager.base.b b = eVar.b();
if (b == null) {
b = com.mobile.auth.gatewayauth.manager.base.b.a("600010", "未知异常");
}
this.d.onError(b);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onResult(com.mobile.auth.r.e eVar) {
try {
a(eVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass4 extends JsonType<LoginPhoneInfo> {
public AnonymousClass4() {
}
}
public class AnonymousClass5 extends JsonType<String> {
public AnonymousClass5() {
}
}
public class AnonymousClass6 extends JsonType<String> {
public AnonymousClass6() {
}
}
public class AnonymousClass7 implements Runnable {
public AnonymousClass7() {
}
@Override
public void run() {
try {
TokenMaskManager.g(TokenMaskManager.this).save(TokenMaskManager.f(TokenMaskManager.this).encryptContent(TokenMaskManager.e(TokenMaskManager.this).toJson().toString()));
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass8 implements Runnable {
public final JSONObject f49107a;
public AnonymousClass8(JSONObject jSONObject) {
this.f49107a = jSONObject;
}
@Override
public void run() {
try {
TokenMaskManager.h(TokenMaskManager.this).save(TokenMaskManager.f(TokenMaskManager.this).encryptContent(this.f49107a.toString()));
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
public class AnonymousClass9 implements RequestCallback<String, com.mobile.auth.gatewayauth.manager.base.b> {
public AnonymousClass9() {
}
public void a(com.mobile.auth.gatewayauth.manager.base.b bVar) {
try {
com.mobile.auth.l.a d = TokenMaskManager.d(TokenMaskManager.this);
String[] strArr = new String[2];
strArr[0] = "Update LoginToken failed when update mask!";
strArr[1] = bVar == null ? "" : bVar.toString();
d.e(strArr);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
public void a(String str) {
try {
TokenMaskManager.d(TokenMaskManager.this).a("Update LoginToken success when update mask!");
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onError(com.mobile.auth.gatewayauth.manager.base.b bVar) {
try {
a(bVar);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
@Override
public void onSuccess(String str) {
try {
a(str);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
}
static {
System.loadLibrary("auth_number_product-2.12.3.4-nolog-online-standard-channel_alijtca_plus");
}
public TokenMaskManager(b bVar, SystemManager systemManager, d dVar, f fVar, VendorSdkInfoManager vendorSdkInfoManager) {
this.f49092a = bVar;
this.b = systemManager;
this.c = dVar;
this.g = dVar.a();
this.d = vendorSdkInfoManager;
this.e = fVar;
this.f = new TokenGenerator(this.g, this.b, this.d);
this.p = CacheManager.getInstance(this.b.e());
b();
com.mobile.auth.gatewayauth.utils.e.a(new Runnable() {
@Override
public void run() {
try {
TokenMaskManager.a(TokenMaskManager.this);
TokenMaskManager.b(TokenMaskManager.this);
TokenMaskManager.c(TokenMaskManager.this);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
});
}
public static String a(TokenMaskManager tokenMaskManager, String str, String str2, boolean z) {
try {
return tokenMaskManager.a(str, str2, z);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
return null;
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
return null;
}
}
}
private native String a(String str, CacheKey cacheKey, long j);
private native String a(String str, String str2, CacheKey cacheKey, long j);
private native String a(String str, String str2, boolean z);
public static void a(TokenMaskManager tokenMaskManager) {
try {
tokenMaskManager.c();
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
public static void a(TokenMaskManager tokenMaskManager, CacheKey cacheKey, LoginPhoneInfo loginPhoneInfo, String str) {
try {
tokenMaskManager.a(cacheKey, loginPhoneInfo, str);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
public static void a(TokenMaskManager tokenMaskManager, String str, String str2, CacheKey cacheKey, String str3, long j) {
try {
tokenMaskManager.b(str, str2, cacheKey, str3, j);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
private native synchronized void a(CacheKey cacheKey, LoginPhoneInfo loginPhoneInfo, String str);
private native synchronized void a(String str, String str2, CacheKey cacheKey, String str3, long j);
private native boolean a(String str, String str2, long j);
private native synchronized boolean a(String str, String str2, LruCache<String, Cache<String>> lruCache, long j);
private native void b();
public static void b(TokenMaskManager tokenMaskManager) {
try {
tokenMaskManager.d();
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
public static void b(TokenMaskManager tokenMaskManager, String str, String str2, CacheKey cacheKey, String str3, long j) {
try {
tokenMaskManager.a(str, str2, cacheKey, str3, j);
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
private native synchronized void b(String str, String str2, CacheKey cacheKey, String str3, long j);
private native boolean b(CacheKey cacheKey);
private native boolean b(String str, String str2, long j);
private native synchronized void c();
public static void c(TokenMaskManager tokenMaskManager) {
try {
tokenMaskManager.e();
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
}
}
}
public static com.mobile.auth.l.a d(TokenMaskManager tokenMaskManager) {
try {
return tokenMaskManager.g;
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
return null;
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
return null;
}
}
}
private native synchronized void d();
public static Cache e(TokenMaskManager tokenMaskManager) {
try {
return tokenMaskManager.i;
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
return null;
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
return null;
}
}
}
private native synchronized void e();
public static SystemManager f(TokenMaskManager tokenMaskManager) {
try {
return tokenMaskManager.b;
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
return null;
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
return null;
}
}
}
private native synchronized void f();
public static CacheHandler g(TokenMaskManager tokenMaskManager) {
try {
return tokenMaskManager.o;
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
return null;
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
return null;
}
}
}
private native synchronized void g();
public static CacheHandler h(TokenMaskManager tokenMaskManager) {
try {
return tokenMaskManager.n;
} catch (Throwable th) {
try {
com.mobile.auth.gatewayauth.a.a(th);
return null;
} catch (Throwable th2) {
com.mobile.auth.gatewayauth.a.a(th2);
return null;
}
}
}
private native synchronized void h();
@SafeProtector
private native synchronized String popToken(String str, CacheKey cacheKey, CacheHandler cacheHandler, LruCache<String, Cache<String>> lruCache, long j);
@SafeProtector
private native void requestMask(long j, String str, RequestCallback<com.mobile.auth.r.d, com.mobile.auth.gatewayauth.manager.base.b> requestCallback, CacheKey cacheKey, String str2, int i, String str3, String str4);
public native LoginPhoneInfo a(CacheKey cacheKey);
public native synchronized void a();
public native void a(long j, String str, RequestCallback<com.mobile.auth.gatewayauth.manager.base.b, com.mobile.auth.gatewayauth.manager.base.b> requestCallback, CacheKey cacheKey, long j2, String str2, String str3, String str4);
public native void a(long j, String str, RequestCallback<String, com.mobile.auth.gatewayauth.manager.base.b> requestCallback, CacheKey cacheKey, String str2, long j2, int i, String str3, String str4);
public native void b(long j, String str, RequestCallback<String, com.mobile.auth.gatewayauth.manager.base.b> requestCallback, CacheKey cacheKey, long j2, String str2, String str3, String str4);
public native void b(long j, String str, RequestCallback<com.mobile.auth.gatewayauth.manager.base.b, com.mobile.auth.gatewayauth.manager.base.b> requestCallback, CacheKey cacheKey, String str2, long j2, int i, String str3, String str4);
@SafeProtector
public native void updateMask(long j, String str, RequestCallback<com.mobile.auth.gatewayauth.manager.base.b, com.mobile.auth.gatewayauth.manager.base.b> requestCallback, CacheKey cacheKey, int i, String str2, String str3, String str4);
}