what-the-bank/sources/o/C15605gzv.java

152 lines
5.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.eracom.OBM2.EncryptedMessageException;
import com.eracom.OBM2.OAEPEncodedMsgException;
import com.eracom.OBM2.PINBlockException;
import com.eracom.OBM2.PINMessageException;
import java.util.Properties;
/* renamed from: o.gzv, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C15605gzv {
private int a;
private String b;
private String c;
public String d;
public String e;
public C15605gzv(String str, String str2) {
this.c = str;
this.b = str2;
this.a = (str2.length() + 1) / 2;
}
public final int b(String str, String str2, Properties properties) {
if (this.a == 0 || this.c == null || this.b == null) {
return 42;
}
try {
C17386wMj c17386wMj = new C17386wMj(new dJC(new xYb(str, properties), str2, this.a, properties), this.a, properties);
this.e = c17386wMj.b;
this.d = c(new Ltv(c17386wMj, this.a, this.c, this.b).e);
return 0;
} catch (EncryptedMessageException e) {
String message = e.getMessage();
int indexOf = message.indexOf("Error no : ");
int parseInt = Integer.parseInt(message.substring(indexOf + 11, indexOf + 13));
System.out.println(message);
return parseInt;
} catch (OAEPEncodedMsgException e2) {
String message2 = e2.getMessage();
int indexOf2 = message2.indexOf("Error no : ");
int parseInt2 = Integer.parseInt(message2.substring(indexOf2 + 11, indexOf2 + 13));
System.out.println(message2);
return parseInt2;
} catch (PINBlockException e3) {
String message3 = e3.getMessage();
int indexOf3 = message3.indexOf("Error no : ");
int parseInt3 = Integer.parseInt(message3.substring(indexOf3 + 11, indexOf3 + 13));
System.out.println(message3);
return parseInt3;
} catch (PINMessageException e4) {
String message4 = e4.getMessage();
int indexOf4 = message4.indexOf("Error no : ");
int parseInt4 = Integer.parseInt(message4.substring(indexOf4 + 11, indexOf4 + 13));
System.out.println(message4);
return parseInt4;
}
}
public final int d(String str, String str2, String str3, Properties properties) {
if (this.a == 0 || this.c == null || this.b == null) {
return 42;
}
try {
C17386wMj c17386wMj = new C17386wMj(new dJC(new xYb(str, properties), new xYb(str2, properties), str3, this.a), this.a);
this.e = c17386wMj.b;
this.d = c(new Ltv(c17386wMj, this.a, this.c, this.b).e);
return 0;
} catch (EncryptedMessageException e) {
String message = e.getMessage();
int indexOf = message.indexOf("Error no : ");
int parseInt = Integer.parseInt(message.substring(indexOf + 11, indexOf + 13));
System.out.println(message);
return parseInt;
} catch (OAEPEncodedMsgException e2) {
String message2 = e2.getMessage();
int indexOf2 = message2.indexOf("Error no : ");
int parseInt2 = Integer.parseInt(message2.substring(indexOf2 + 11, indexOf2 + 13));
System.out.println(message2);
return parseInt2;
} catch (PINBlockException e3) {
String message3 = e3.getMessage();
int indexOf3 = message3.indexOf("Error no : ");
int parseInt3 = Integer.parseInt(message3.substring(indexOf3 + 11, indexOf3 + 13));
System.out.println(message3);
return parseInt3;
} catch (PINMessageException e4) {
String message4 = e4.getMessage();
int indexOf4 = message4.indexOf("Error no : ");
int parseInt4 = Integer.parseInt(message4.substring(indexOf4 + 11, indexOf4 + 13));
System.out.println(message4);
return parseInt4;
}
}
public static void d(byte[] bArr, byte[] bArr2, int i) {
int i2;
int i3;
int i4 = (i + 1) / 2;
int i5 = 0;
int i6 = 0;
while (i5 < i4) {
if (i6 < i - 1) {
i2 = (bArr[i6] & 15) << 4;
i3 = bArr[i6 + 1] & 15;
} else {
i2 = bArr2[i5 + 1] & 15;
i3 = (bArr[i6] & 15) << 4;
}
i5++;
bArr2[i5] = (byte) (i2 | i3);
i6 += 2;
}
}
public static String c(byte[] bArr) {
StringBuffer stringBuffer = new StringBuffer();
int length = bArr.length;
for (int i = 0; i < length; i++) {
stringBuffer.append(Character.toUpperCase(Character.forDigit((bArr[i] & 240) >> 4, 16)));
stringBuffer.append(Character.toUpperCase(Character.forDigit(bArr[i] & 15, 16)));
}
return new String(stringBuffer);
}
public static int b(String str, byte[] bArr, int i) {
int length = str.length();
int i2 = 0;
int i3 = 0;
while (i2 < length) {
int digit = Character.digit(str.charAt(i2), 16);
if (digit == -1) {
return 1;
}
int i4 = digit << 4;
int i5 = i2 + 1;
if (i5 < length) {
int digit2 = Character.digit(str.charAt(i5), 16);
if (digit2 == -1) {
return 1;
}
bArr[i3 + i] = (byte) (i4 | digit2);
} else {
bArr[i3 + i] = (byte) (i4 | 15);
}
i2 += 2;
i3++;
}
return 0;
}
}