106 lines
4.2 KiB
Java
106 lines
4.2 KiB
Java
|
package o;
|
||
|
|
||
|
import com.google.common.base.Ascii;
|
||
|
import com.google.common.primitives.UnsignedBytes;
|
||
|
import io.flutter.embedding.android.KeyboardMap;
|
||
|
import java.util.Arrays;
|
||
|
|
||
|
/* renamed from: o.cDf, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class C5926cDf {
|
||
|
private static long a(byte[] bArr, int i) {
|
||
|
return (((bArr[i + 3] & UnsignedBytes.MAX_VALUE) << 24) | (bArr[i] & UnsignedBytes.MAX_VALUE) | ((bArr[i + 1] & UnsignedBytes.MAX_VALUE) << 8) | ((bArr[i + 2] & UnsignedBytes.MAX_VALUE) << 16)) & KeyboardMap.kValueMask;
|
||
|
}
|
||
|
|
||
|
private static void e(byte[] bArr, long j, int i) {
|
||
|
int i2 = 0;
|
||
|
while (i2 < 4) {
|
||
|
bArr[i + i2] = (byte) (255 & j);
|
||
|
i2++;
|
||
|
j >>= 8;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static void e(byte[] bArr, byte[] bArr2, int i) {
|
||
|
int min = Math.min(16, bArr2.length - i);
|
||
|
System.arraycopy(bArr2, i, bArr, 0, min);
|
||
|
bArr[min] = 1;
|
||
|
if (min != 16) {
|
||
|
Arrays.fill(bArr, min + 1, bArr.length, (byte) 0);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public static byte[] c(byte[] bArr, byte[] bArr2) {
|
||
|
int length = bArr.length;
|
||
|
long j = 67108863;
|
||
|
long a = a(bArr, 0) & 67108863;
|
||
|
int i = 3;
|
||
|
long a2 = (a(bArr, 3) >> 2) & 67108611;
|
||
|
long a3 = (a(bArr, 6) >> 4) & 67092735;
|
||
|
long a4 = (a(bArr, 9) >> 6) & 66076671;
|
||
|
long a5 = (a(bArr, 12) >> 8) & 1048575;
|
||
|
long j2 = a3 * 5;
|
||
|
long j3 = a4 * 5;
|
||
|
long j4 = a5 * 5;
|
||
|
byte[] bArr3 = new byte[17];
|
||
|
long j5 = 0;
|
||
|
int i2 = 0;
|
||
|
long j6 = 0;
|
||
|
long j7 = 0;
|
||
|
long j8 = 0;
|
||
|
long j9 = 0;
|
||
|
while (i2 < bArr2.length) {
|
||
|
e(bArr3, bArr2, i2);
|
||
|
long a6 = j9 + (a(bArr3, 0) & j);
|
||
|
long a7 = j6 + ((a(bArr3, i) >> 2) & j);
|
||
|
long a8 = j5 + ((a(bArr3, 6) >> 4) & j);
|
||
|
long a9 = j7 + ((a(bArr3, 9) >> 6) & j);
|
||
|
long a10 = j8 + (((a(bArr3, 12) >> 8) & j) | (bArr3[16] << Ascii.CAN));
|
||
|
long j10 = (a6 * a) + (a7 * j4) + (a8 * j3) + (a9 * j2) + (a2 * 5 * a10);
|
||
|
long j11 = (a6 * a2) + (a7 * a) + (a8 * j4) + (a9 * j3) + (a10 * j2) + (j10 >> 26);
|
||
|
long j12 = (a6 * a3) + (a7 * a2) + (a8 * a) + (a9 * j4) + (a10 * j3) + (j11 >> 26);
|
||
|
long j13 = (a6 * a4) + (a7 * a3) + (a8 * a2) + (a9 * a) + (a10 * j4) + (j12 >> 26);
|
||
|
long j14 = (a6 * a5) + (a7 * a4) + (a8 * a3) + (a9 * a2) + (a10 * a) + (j13 >> 26);
|
||
|
long j15 = (j10 & 67108863) + ((j14 >> 26) * 5);
|
||
|
j6 = (j11 & 67108863) + (j15 >> 26);
|
||
|
i2 += 16;
|
||
|
j5 = j12 & 67108863;
|
||
|
j7 = j13 & 67108863;
|
||
|
j8 = j14 & 67108863;
|
||
|
j9 = j15 & 67108863;
|
||
|
j = 67108863;
|
||
|
i = 3;
|
||
|
}
|
||
|
long j16 = j;
|
||
|
long j17 = j5 + (j6 >> 26);
|
||
|
long j18 = j17 & j16;
|
||
|
long j19 = j7 + (j17 >> 26);
|
||
|
long j20 = j19 & j16;
|
||
|
long j21 = j8 + (j19 >> 26);
|
||
|
long j22 = j21 & j16;
|
||
|
long j23 = j9 + ((j21 >> 26) * 5);
|
||
|
long j24 = j23 & j16;
|
||
|
long j25 = (j6 & j16) + (j23 >> 26);
|
||
|
long j26 = j24 + 5;
|
||
|
long j27 = (j26 >> 26) + j25;
|
||
|
long j28 = j18 + (j27 >> 26);
|
||
|
long j29 = j20 + (j28 >> 26);
|
||
|
long j30 = (j22 + (j29 >> 26)) - 67108864;
|
||
|
long j31 = j30 >> 63;
|
||
|
long j32 = ~j31;
|
||
|
long j33 = (j25 & j31) | (j27 & 67108863 & j32);
|
||
|
long j34 = (j28 & 67108863 & j32) | (j18 & j31);
|
||
|
long j35 = (j29 & 67108863 & j32) | (j20 & j31);
|
||
|
long a11 = (((j24 & j31) | (j26 & 67108863 & j32) | (j33 << 26)) & KeyboardMap.kValueMask) + a(bArr, 16);
|
||
|
long a12 = (((j33 >> 6) | (j34 << 20)) & KeyboardMap.kValueMask) + a(bArr, 20) + (a11 >> 32);
|
||
|
long a13 = (((j34 >> 12) | (j35 << 14)) & KeyboardMap.kValueMask) + a(bArr, 24) + (a12 >> 32);
|
||
|
long a14 = a(bArr, 28);
|
||
|
byte[] bArr4 = new byte[16];
|
||
|
e(bArr4, a11 & KeyboardMap.kValueMask, 0);
|
||
|
e(bArr4, a12 & KeyboardMap.kValueMask, 4);
|
||
|
e(bArr4, a13 & KeyboardMap.kValueMask, 8);
|
||
|
e(bArr4, ((((((j30 & j32) | (j22 & j31)) << 8) | (j35 >> 18)) & KeyboardMap.kValueMask) + a14 + (a13 >> 32)) & KeyboardMap.kValueMask, 12);
|
||
|
return bArr4;
|
||
|
}
|
||
|
}
|