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

119 lines
10 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import com.google.android.gms.dynamite.descriptors.com.google.android.gms.tagmanager.ModuleDescriptor;
import org.bouncycastle.asn1.x509.DisplayText;
import org.bouncycastle.crypto.tls.CipherSuite;
import org.bouncycastle.math.Primes;
import org.jmrtd.PassportService;
import org.jmrtd.cbeff.ISO781611;
/* loaded from: classes2.dex */
public final class Pjp {
private static final int[] c = {5, 7, 10, 11, 12, 14, 18, 20, 24, 28, 36, 42, 48, 56, 62, 68};
private static final int[][] a = {new int[]{228, 48, 15, 111, 62}, new int[]{23, 68, CipherSuite.TLS_DHE_PSK_WITH_AES_128_CBC_SHA, 134, 240, 92, 254}, new int[]{28, 24, CipherSuite.TLS_RSA_PSK_WITH_NULL_SHA384, CipherSuite.TLS_DH_anon_WITH_AES_128_GCM_SHA256, 223, 248, 116, 255, 110, 61}, new int[]{CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA384, CipherSuite.TLS_PSK_WITH_RC4_128_SHA, 205, 12, CipherSuite.TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256, CipherSuite.TLS_PSK_WITH_AES_128_GCM_SHA256, 39, 245, 60, 97, 120}, new int[]{41, 153, 158, 91, 61, 42, 142, 213, 97, CipherSuite.TLS_DHE_PSK_WITH_AES_128_CBC_SHA256, 100, 242}, new int[]{CipherSuite.TLS_RSA_WITH_AES_128_GCM_SHA256, 97, 192, 252, 95, 9, CipherSuite.TLS_RSA_WITH_AES_256_GCM_SHA384, 119, CipherSuite.TLS_PSK_WITH_RC4_128_SHA, 45, 18, CipherSuite.TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, 83, CipherSuite.TLS_RSA_PSK_WITH_NULL_SHA384}, new int[]{83, CipherSuite.TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256, 100, 39, 188, 75, 66, 61, 241, 213, 109, 129, 94, 254, 225, 48, 90, 188}, new int[]{15, CipherSuite.TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256, 244, 9, 233, 71, CipherSuite.TLS_PSK_WITH_AES_128_GCM_SHA256, 2, 188, 160, 153, CipherSuite.TLS_DHE_PSK_WITH_AES_256_CBC_SHA, 253, 79, 108, 82, 27, CipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA256, CipherSuite.TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, CipherSuite.TLS_RSA_PSK_WITH_AES_128_GCM_SHA256}, new int[]{52, CipherSuite.TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256, 88, 205, 109, 39, CipherSuite.TLS_PSK_WITH_NULL_SHA256, 21, CipherSuite.TLS_DH_anon_WITH_SEED_CBC_SHA, CipherSuite.TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256, 251, 223, CipherSuite.TLS_DH_anon_WITH_SEED_CBC_SHA, 21, 5, CipherSuite.TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, 254, 124, 12, CipherSuite.TLS_DHE_PSK_WITH_NULL_SHA384, CipherSuite.TLS_RSA_PSK_WITH_NULL_SHA256, 96, 50, CipherSuite.TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256}, new int[]{Primes.SMALL_FACTOR_LIMIT, 231, 43, 97, 71, 96, 103, CipherSuite.TLS_PSK_WITH_AES_128_CBC_SHA256, 37, 151, CipherSuite.TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, 53, 75, 34, 249, 121, 17, CipherSuite.TLS_PSK_WITH_RC4_128_SHA, 110, 213, CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA, 136, 120, 151, 233, CipherSuite.TLS_PSK_WITH_AES_128_GCM_SHA256, 93, 255}, new int[]{245, 127, 242, 218, ISO781611.BIOMETRIC_SUBTYPE_TAG, 250, CipherSuite.TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, CipherSuite.TLS_DHE_PSK_WITH_NULL_SHA384, 102, 120, 84, CipherSuite.TLS_DHE_PSK_WITH_AES_256_CBC_SHA384, 220, 251, 80, CipherSuite.TLS_RSA_PSK_WITH_AES_128_CBC_SHA256, 229, 18, 2, 4, 68, 33, 101, CipherSuite.TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA, 95, 119, 115, 44, CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA384, CipherSuite.TLS_RSA_PSK_WITH_NULL_SHA256, 59, 25, 225, 98, 81, 112}, new int[]{77, CipherSuite.TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256, CipherSuite.TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA, 31, 19, 38, 22, 153, 247, 105, 122, 2, 245, 133, 242, 8, CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA384, 95, 100, 9, CipherSuite.TLS_DH_anon_WITH_AES_256_GCM_SHA384, 105, ModuleDescriptor.MODULE_VERSION, 111, 57, 121, 21, 1, 253, 57, 54, 101, 248, 202, 69, 50, CipherSuite.TLS_RSA_WITH_SEED_CBC_SHA, CipherSuite.TLS_PSK_WITH_NULL_SHA384, 226, 5, 9, 5}, new int[]{245, CipherSuite.TLS_RSA_WITH_CAMELLIA_256_CBC_SHA, CipherSuite.TLS_RSA_PSK_WITH_AES_128_GCM_SHA256, 223, 96, 32, 117, 22, 238, 133, 238, 231, 205, 188, 237, 87, CipherSuite.TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256, 106, 16, CipherSuite.TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, 118, 23, 37, 90, CipherSuite.TLS_DHE_PSK_WITH_AES_128_GCM_SHA256, 205, ISO781611.CREATION_DATE_AND_TIME_TAG, 88, 120, 100, 66, CipherSuite.TLS_PSK_WITH_RC4_128_SHA, CipherSuite.TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256, 240, 82, 44, CipherSuite.TLS_PSK_WITH_NULL_SHA256, 87, CipherSuite.TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256, CipherSuite.TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA, 160, CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA384, 69, 213, 92, 253, 225, 19}, new int[]{CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA384, 9, 223, 238, 12, 17, 220, 208, 100, 29, CipherSuite.TLS_PSK_WITH_AES_256_CBC_SHA384, CipherSuite
private static final int[] d = new int[256];
private static final int[] e = new int[255];
static {
int i = 1;
for (int i2 = 0; i2 < 255; i2++) {
e[i2] = i;
d[i] = i2;
i <<= 1;
if (i >= 256) {
i ^= 301;
}
}
}
public static String a(String str, Nnt nnt) {
if (str.length() != nnt.e) {
throw new IllegalArgumentException("The number of codewords does not match the selected symbol");
}
StringBuilder sb = new StringBuilder(nnt.e + nnt.c);
sb.append(str);
int a2 = nnt.a();
if (a2 == 1) {
sb.append(e(str, nnt.c));
} else {
sb.setLength(sb.capacity());
int[] iArr = new int[a2];
int[] iArr2 = new int[a2];
int i = 0;
while (i < a2) {
int i2 = i + 1;
iArr[i] = nnt.e(i2);
iArr2[i] = nnt.b;
i = i2;
}
for (int i3 = 0; i3 < a2; i3++) {
StringBuilder sb2 = new StringBuilder(iArr[i3]);
for (int i4 = i3; i4 < nnt.e; i4 += a2) {
sb2.append(str.charAt(i4));
}
String e2 = e(sb2.toString(), iArr2[i3]);
int i5 = 0;
int i6 = i3;
while (i6 < iArr2[i3] * a2) {
sb.setCharAt(nnt.e + i6, e2.charAt(i5));
i6 += a2;
i5++;
}
}
}
return sb.toString();
}
private static String e(CharSequence charSequence, int i) {
int i2;
int i3;
int i4 = 0;
while (true) {
int[] iArr = c;
if (i4 >= iArr.length) {
i4 = -1;
break;
}
if (iArr[i4] == i) {
break;
}
i4++;
}
if (i4 < 0) {
throw new IllegalArgumentException("Illegal number of error correction codewords specified: ".concat(String.valueOf(i)));
}
int[] iArr2 = a[i4];
char[] cArr = new char[i];
for (int i5 = 0; i5 < i; i5++) {
cArr[i5] = 0;
}
for (int i6 = 0; i6 < charSequence.length(); i6++) {
int i7 = i - 1;
int charAt = cArr[i7] ^ charSequence.charAt(i6);
while (i7 > 0) {
if (charAt != 0 && (i3 = iArr2[i7]) != 0) {
char c2 = cArr[i7 - 1];
int[] iArr3 = e;
int[] iArr4 = d;
cArr[i7] = (char) (iArr3[(iArr4[charAt] + iArr4[i3]) % 255] ^ c2);
} else {
cArr[i7] = cArr[i7 - 1];
}
i7--;
}
if (charAt != 0 && (i2 = iArr2[0]) != 0) {
int[] iArr5 = e;
int[] iArr6 = d;
cArr[0] = (char) iArr5[(iArr6[charAt] + iArr6[i2]) % 255];
} else {
cArr[0] = 0;
}
}
char[] cArr2 = new char[i];
for (int i8 = 0; i8 < i; i8++) {
cArr2[i8] = cArr[(i - i8) - 1];
}
return String.valueOf(cArr2);
}
}