Files
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

87 lines
2.7 KiB
Java

package com.mbridge.msdk.foundation.tools;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;
/* loaded from: classes4.dex */
public final class y {
public static final char[] a;
public static final int[] b;
static {
char[] charArray = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
a = charArray;
int[] iArr = new int[256];
b = iArr;
Arrays.fill(iArr, -1);
int length = charArray.length;
for (int i = 0; i < length; i++) {
b[a[i]] = i;
}
b[61] = 0;
}
public static String a(String str) {
int i;
byte[] bArr;
int length = str.length();
if (length == 0) {
bArr = new byte[0];
} else {
int i2 = length - 1;
int i3 = 0;
while (i3 < i2 && b[str.charAt(i3) & 255] < 0) {
i3++;
}
while (i2 > 0 && b[str.charAt(i2) & 255] < 0) {
i2--;
}
int i4 = str.charAt(i2) == '=' ? str.charAt(i2 + (-1)) == '=' ? 2 : 1 : 0;
int i5 = (i2 - i3) + 1;
if (length > 76) {
i = (str.charAt(76) == '\r' ? i5 / 78 : 0) << 1;
} else {
i = 0;
}
int i6 = (((i5 - i) * 6) >> 3) - i4;
byte[] bArr2 = new byte[i6];
int i7 = (i6 / 3) * 3;
int i8 = 0;
int i9 = 0;
while (i8 < i7) {
int[] iArr = b;
int i10 = i3 + 4;
int i11 = iArr[str.charAt(i3 + 3)] | (iArr[str.charAt(i3 + 1)] << 12) | (iArr[str.charAt(i3)] << 18) | (iArr[str.charAt(i3 + 2)] << 6);
bArr2[i8] = (byte) (i11 >> 16);
int i12 = i8 + 2;
bArr2[i8 + 1] = (byte) (i11 >> 8);
i8 += 3;
bArr2[i12] = (byte) i11;
if (i <= 0 || (i9 = i9 + 1) != 19) {
i3 = i10;
} else {
i3 += 6;
i9 = 0;
}
}
if (i8 < i6) {
int i13 = 0;
int i14 = 0;
while (i3 <= i2 - i4) {
i13 |= b[str.charAt(i3)] << (18 - (i14 * 6));
i14++;
i3++;
}
int i15 = 16;
while (i8 < i6) {
bArr2[i8] = (byte) (i13 >> i15);
i15 -= 8;
i8++;
}
}
bArr = bArr2;
}
return bArr.length == 0 ? "" : new String(bArr, StandardCharsets.UTF_8);
}
}