what-the-bank/sources/com/kofax/mobile/sdk/aa/d.java

91 lines
2.7 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.mobile.sdk.aa;
import com.kofax.kmc.kut.utilities.Licensing;
import com.kofax.kmc.kut.utilities.error.ErrorInfo;
import java.util.Arrays;
/* loaded from: classes3.dex */
public class d {
private static i SY = i.UNDEFINED;
private static int SZ = 0;
private static boolean[] Ta = null;
private static final int Tb = -1;
private static final int Tc = 0;
private static final int Td = 1;
private static final int Te = 2;
private static final int Tf = 7;
private static final int Tg = 5;
public static boolean aB(String str) {
boolean[] zArr = Ta;
if (zArr != null) {
return zArr[e.Ti.get(str).intValue()];
}
return false;
}
public static ErrorInfo aC(String str) {
ErrorInfo errorInfo = ErrorInfo.KMC_EV_LICENSING;
if (str != null && ErrorInfo.KMC_SUCCESS == (errorInfo = aD(str))) {
byte[] bytes = str.getBytes();
boolean[] zArr = new boolean[5];
Ta = zArr;
Arrays.fill(zArr, true);
if (i.ATALASOFT == SY) {
a(Ta, Licensing.LicenseType.IMAGE_CAPTURE.name(), bytes);
a(Ta, Licensing.LicenseType.IMAGE_PROCESSING.name(), bytes);
a(Ta, Licensing.LicenseType.BARCODE_CAPTURE.name(), bytes);
a(Ta, Licensing.LicenseType.LOGISTICS.name(), false);
a(Ta, Licensing.LicenseType.ID_EXTRACTION.name(), false);
}
}
return errorInfo;
}
private static void a(boolean[] zArr, String str, byte[] bArr) {
zArr[e.Ti.get(str).intValue()] = bArr[e.Tj.get(str).intValue()] == 49;
}
private static void a(boolean[] zArr, String str, boolean z) {
zArr[e.Ti.get(str).intValue()] = z;
}
public static void qM() {
SY = i.UNDEFINED;
Ta = null;
SZ = 0;
}
public static ErrorInfo aD(String str) {
int i;
ErrorInfo errorInfo = ErrorInfo.KMC_SUCCESS;
try {
i = Integer.parseInt(new StringBuilder(str.substring(0, 3)).reverse().toString(), 2);
} catch (Exception e) {
errorInfo = ErrorInfo.KMC_EV_LICENSING;
errorInfo.setErrCause(e.getMessage());
i = -1;
}
if (ErrorInfo.KMC_SUCCESS != errorInfo) {
return errorInfo;
}
if (i == 0 || 7 == i || 1 == i) {
SY = i.KOFAX;
return errorInfo;
}
if (2 == i) {
SY = i.ATALASOFT;
return errorInfo;
}
return ErrorInfo.KMC_EV_LICENSING;
}
public static void p(int i) {
SZ = i;
}
public static int getDaysRemaining() {
return SZ;
}
}