what-the-bank/sources/com/google/android/gms/internal/p002firebaseauthapi/zziz.java

34 lines
1.0 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.p002firebaseauthapi;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class zziz {
public static byte[] zza(byte[] bArr) {
int length = bArr.length;
if (length >= 16) {
throw new IllegalArgumentException("x must be smaller than a block.");
}
byte[] copyOf = Arrays.copyOf(bArr, 16);
copyOf[length] = Byte.MIN_VALUE;
return copyOf;
}
public static byte[] zzb(byte[] bArr) {
if (bArr.length != 16) {
throw new IllegalArgumentException("value must be a block.");
}
byte[] bArr2 = new byte[16];
for (int i = 0; i < 16; i++) {
byte b = bArr[i];
byte b2 = (byte) ((b + b) & 254);
bArr2[i] = b2;
if (i < 15) {
bArr2[i] = (byte) (((bArr[i + 1] >> 7) & 1) | b2);
}
}
bArr2[15] = (byte) (((byte) ((bArr[0] >> 7) & 135)) ^ bArr2[15]);
return bArr2;
}
}