what-the-bank/sources/com/facetec/sdk/bz.java

65 lines
2.2 KiB
Java

package com.facetec.sdk;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import java.util.Random;
import java.util.UUID;
/* loaded from: classes.dex */
final class bz {
bz() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static String c(String str) {
int nextInt = new Random().nextInt(8);
int i = nextInt + 2;
String replace = UUID.randomUUID().toString().replace("-", "");
StringBuilder sb = new StringBuilder();
sb.append(replace.substring(0, 1));
sb.append(i);
sb.append(replace.substring(2));
String obj = sb.toString();
StringBuilder sb2 = new StringBuilder();
sb2.append(obj.substring(0, i));
sb2.append(str);
sb2.append(obj.substring(nextInt + 3));
return sb2.toString();
}
/* JADX INFO: Access modifiers changed from: package-private */
public static String e(String str) {
int nextInt = new Random().nextInt(8);
int i = nextInt + 2;
String replace = UUID.randomUUID().toString().replace("-", "");
StringBuilder sb = new StringBuilder();
sb.append(replace.substring(0, 1));
sb.append(i);
sb.append(replace.substring(2));
String obj = sb.toString();
int length = (replace.length() - 1) - i;
StringBuilder sb2 = new StringBuilder();
sb2.append(obj.substring(0, i));
sb2.append(str.charAt(0));
sb2.append(obj.substring(nextInt + 3));
String obj2 = sb2.toString();
StringBuilder sb3 = new StringBuilder();
sb3.append(obj2.substring(0, length));
sb3.append(str.charAt(1));
sb3.append(obj2.substring(length + 1));
return sb3.toString();
}
/* JADX INFO: Access modifiers changed from: package-private */
public static boolean c(Context context) {
NetworkInfo activeNetworkInfo = ((ConnectivityManager) context.getApplicationContext().getSystemService("connectivity")).getActiveNetworkInfo();
if (activeNetworkInfo != null) {
if (activeNetworkInfo.isConnected() & (activeNetworkInfo.getType() == 1)) {
return true;
}
}
return false;
}
}