57 lines
1.7 KiB
Java
57 lines
1.7 KiB
Java
package o;
|
|
|
|
/* renamed from: o.bfN, reason: case insensitive filesystem */
|
|
/* loaded from: classes3.dex */
|
|
public final class C4711bfN {
|
|
private static byte[] d = new byte[255];
|
|
private static final byte[] e = C17796znh.c("0123456789ABCDEF");
|
|
|
|
static {
|
|
for (int i = 0; i < 255; i++) {
|
|
d[i] = -1;
|
|
}
|
|
for (int i2 = 57; i2 >= 48; i2--) {
|
|
d[i2] = (byte) (i2 - 48);
|
|
}
|
|
for (int i3 = 70; i3 >= 65; i3--) {
|
|
d[i3] = (byte) (i3 - 55);
|
|
}
|
|
for (int i4 = 102; i4 >= 97; i4--) {
|
|
d[i4] = (byte) (i4 - 87);
|
|
}
|
|
}
|
|
|
|
public static byte[] b(byte[] bArr) {
|
|
int length = bArr.length;
|
|
byte[] bArr2 = new byte[length << 1];
|
|
for (int i = 0; i < length; i++) {
|
|
int i2 = i << 1;
|
|
byte[] bArr3 = e;
|
|
bArr2[i2] = bArr3[(bArr[i] & 240) >> 4];
|
|
bArr2[i2 + 1] = bArr3[bArr[i] & 15];
|
|
}
|
|
return bArr2;
|
|
}
|
|
|
|
public static byte[] c(byte[] bArr) {
|
|
return e(bArr, bArr.length);
|
|
}
|
|
|
|
private static byte[] e(byte[] bArr, int i) {
|
|
try {
|
|
int i2 = i / 2;
|
|
byte[] bArr2 = new byte[i2];
|
|
for (int i3 = 0; i3 < i2; i3++) {
|
|
byte[] bArr3 = d;
|
|
int i4 = i3 << 1;
|
|
bArr2[i3] = (byte) (bArr3[bArr[i4 + 1]] | (bArr3[bArr[i4]] << 4));
|
|
}
|
|
return bArr2;
|
|
} catch (ArrayIndexOutOfBoundsException unused) {
|
|
StringBuilder sb = new StringBuilder("Data is not hexbin encoded, data=");
|
|
sb.append((String) C17796znh.a(new Object[]{bArr}));
|
|
throw new IllegalArgumentException(sb.toString());
|
|
}
|
|
}
|
|
}
|