212 lines
7.2 KiB
Java
212 lines
7.2 KiB
Java
package scb.yek;
|
|
|
|
import com.google.common.base.Ascii;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import net.sf.scuba.smartcards.ISO7816;
|
|
import o.Awr;
|
|
import o.C14957gcv;
|
|
import o.C17133uFJ;
|
|
import o.C3614bBe;
|
|
import o.Nhs;
|
|
import o.TAC;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public final class IntegrityKey extends GetKey {
|
|
private static char[] a;
|
|
public static final IntegrityKey b;
|
|
private static byte c;
|
|
private static long d;
|
|
private static int e;
|
|
private static long f;
|
|
private static char g;
|
|
private static boolean h;
|
|
private static boolean i;
|
|
private static int j;
|
|
private static final byte[] k = {104, 69, 71, -100, -47, 8, 47, ISO7816.INS_WRITE_RECORD, 6, 5, 7, -8, -22, Ascii.US, -5, Ascii.DC2, -15, 19, 9};
|
|
|
|
/* renamed from: o, reason: collision with root package name */
|
|
private static final int f9340o = 236;
|
|
|
|
public final native String hwAppIdFromJNI();
|
|
|
|
public final native String integrityKeyFromJNI();
|
|
|
|
public final native String secretKeyFromJNI(String str);
|
|
|
|
private IntegrityKey() {
|
|
}
|
|
|
|
static {
|
|
e();
|
|
d();
|
|
b = new IntegrityKey();
|
|
byte b2 = (byte) 0;
|
|
byte b3 = (byte) (b2 + 1);
|
|
Object[] objArr = new Object[1];
|
|
n(b2, b3, b3, objArr);
|
|
e((String) objArr[0]);
|
|
}
|
|
|
|
public final String e(String str, String str2) {
|
|
C14957gcv.e(str, "");
|
|
C14957gcv.e(str2, "");
|
|
return c(str, str2, secretKeyFromJNI(str2));
|
|
}
|
|
|
|
private static InputStream d(InputStream inputStream, int i2, int i3, byte[] bArr) throws IOException {
|
|
int length = bArr.length;
|
|
byte[] bArr2 = new byte[length];
|
|
System.arraycopy(bArr, 0, bArr2, 0, length);
|
|
TAC.c(bArr2, c, d);
|
|
return new C17133uFJ(inputStream, i3, bArr2, Awr.e(i2));
|
|
}
|
|
|
|
private static void s(char c2, int i2, char[] cArr, char[] cArr2, char[] cArr3, Object[] objArr) {
|
|
Nhs nhs = new Nhs();
|
|
int length = cArr.length;
|
|
char[] cArr4 = new char[length];
|
|
int length2 = cArr3.length;
|
|
char[] cArr5 = new char[length2];
|
|
System.arraycopy(cArr, 0, cArr4, 0, length);
|
|
System.arraycopy(cArr3, 0, cArr5, 0, length2);
|
|
cArr4[0] = (char) (cArr4[0] ^ c2);
|
|
cArr5[2] = (char) (cArr5[2] + ((char) i2));
|
|
int length3 = cArr2.length;
|
|
char[] cArr6 = new char[length3];
|
|
nhs.a = 0;
|
|
while (nhs.a < length3) {
|
|
int i3 = (nhs.a + 2) % 4;
|
|
int i4 = (nhs.a + 3) % 4;
|
|
nhs.c = (char) (((cArr4[nhs.a % 4] * 32718) + cArr5[i3]) % 65535);
|
|
cArr5[i4] = (char) (((cArr4[i4] * 32718) + cArr5[i3]) / 65535);
|
|
cArr4[i4] = nhs.c;
|
|
cArr6[nhs.a] = (char) ((((cArr4[i4] ^ cArr2[nhs.a]) ^ (f ^ 9051040786702654117L)) ^ ((int) (j ^ 9051040786702654117L))) ^ ((char) (g ^ 9051040786702654117L)));
|
|
nhs.a++;
|
|
}
|
|
objArr[0] = new String(cArr6);
|
|
}
|
|
|
|
private static void r(char[] cArr, byte[] bArr, int[] iArr, int i2, Object[] objArr) {
|
|
C3614bBe c3614bBe = new C3614bBe();
|
|
char[] cArr2 = a;
|
|
if (cArr2 != null) {
|
|
int length = cArr2.length;
|
|
char[] cArr3 = new char[length];
|
|
for (int i3 = 0; i3 < length; i3++) {
|
|
cArr3[i3] = (char) (cArr2[i3] ^ 4465412551090060952L);
|
|
}
|
|
cArr2 = cArr3;
|
|
}
|
|
int i4 = (int) (4465412551090060952L ^ e);
|
|
if (h) {
|
|
c3614bBe.c = bArr.length;
|
|
char[] cArr4 = new char[c3614bBe.c];
|
|
c3614bBe.a = 0;
|
|
while (c3614bBe.a < c3614bBe.c) {
|
|
cArr4[c3614bBe.a] = (char) (cArr2[bArr[(c3614bBe.c - 1) - c3614bBe.a] + i2] - i4);
|
|
c3614bBe.a++;
|
|
}
|
|
objArr[0] = new String(cArr4);
|
|
return;
|
|
}
|
|
if (i) {
|
|
c3614bBe.c = cArr.length;
|
|
char[] cArr5 = new char[c3614bBe.c];
|
|
c3614bBe.a = 0;
|
|
while (c3614bBe.a < c3614bBe.c) {
|
|
cArr5[c3614bBe.a] = (char) (cArr2[cArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - i4);
|
|
c3614bBe.a++;
|
|
}
|
|
objArr[0] = new String(cArr5);
|
|
return;
|
|
}
|
|
c3614bBe.c = iArr.length;
|
|
char[] cArr6 = new char[c3614bBe.c];
|
|
c3614bBe.a = 0;
|
|
while (c3614bBe.a < c3614bBe.c) {
|
|
cArr6[c3614bBe.a] = (char) (cArr2[iArr[(c3614bBe.c - 1) - c3614bBe.a] - i2] - i4);
|
|
c3614bBe.a++;
|
|
}
|
|
objArr[0] = new String(cArr6);
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:10:0x002a */
|
|
/* JADX WARN: Removed duplicated region for block: B:7:0x0022 */
|
|
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x002a -> B:4:0x0030). Please report as a decompilation issue!!! */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private static void n(int r6, byte r7, int r8, java.lang.Object[] r9) {
|
|
/*
|
|
int r8 = r8 * 5
|
|
int r0 = 11 - r8
|
|
byte[] r1 = scb.yek.IntegrityKey.k
|
|
int r7 = r7 * 5
|
|
int r7 = 8 - r7
|
|
int r6 = r6 * 4
|
|
int r6 = r6 + 98
|
|
byte[] r0 = new byte[r0]
|
|
int r8 = 10 - r8
|
|
r2 = 0
|
|
if (r1 != 0) goto L19
|
|
r6 = r7
|
|
r4 = r8
|
|
r3 = r2
|
|
goto L30
|
|
L19:
|
|
r3 = r2
|
|
r5 = r7
|
|
r7 = r6
|
|
r6 = r5
|
|
L1d:
|
|
byte r4 = (byte) r7
|
|
r0[r3] = r4
|
|
if (r3 != r8) goto L2a
|
|
java.lang.String r6 = new java.lang.String
|
|
r6.<init>(r0, r2)
|
|
r9[r2] = r6
|
|
return
|
|
L2a:
|
|
int r3 = r3 + 1
|
|
int r6 = r6 + 1
|
|
r4 = r1[r6]
|
|
L30:
|
|
int r7 = r7 + r4
|
|
int r7 = r7 + (-2)
|
|
goto L1d
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: scb.yek.IntegrityKey.n(int, byte, int, java.lang.Object[]):void");
|
|
}
|
|
|
|
static void e() {
|
|
a = new char[]{16263, 16332, 16329, 16380, 16331, 16327, 16325, 16262, 16379, 16330, 16376, 16320, 16326, 16333, 16335, 16346, 16381, 16321, 16324, 16289, 16368, 16295, 16334, 16322, 16378, 16306, 16292, 16382, 16302, 16300, 16297, 16344};
|
|
e = 1934311016;
|
|
i = true;
|
|
h = true;
|
|
f = 9051040786702654117L;
|
|
j = 452713125;
|
|
g = (char) 65046;
|
|
}
|
|
|
|
static void d() {
|
|
d = -5460580109075031448L;
|
|
c = ISO7816.INS_PUT_DATA;
|
|
}
|
|
|
|
/* JADX WARN: Removed duplicated region for block: B:134:0x05d3 A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
|
/* JADX WARN: Removed duplicated region for block: B:40:0x03b7 A[EXC_TOP_SPLITTER, SYNTHETIC] */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private static void e(java.lang.String r24) {
|
|
/*
|
|
Method dump skipped, instructions count: 2030
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: scb.yek.IntegrityKey.e(java.lang.String):void");
|
|
}
|
|
}
|