Files
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

98 lines
2.9 KiB
Java

package com.google.android.gms.internal.ads;
import java.security.GeneralSecurityException;
import java.security.InvalidAlgorithmParameterException;
import java.security.Key;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import javax.crypto.Mac;
/* loaded from: classes3.dex */
public final class zzgvk implements zzgpy {
private final ThreadLocal zza;
private final String zzb;
private final Key zzc;
private final int zzd;
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
public zzgvk(String str, Key key) throws GeneralSecurityException {
char c;
int i;
zzgvj zzgvjVar = new zzgvj(this);
this.zza = zzgvjVar;
if (!zzgks.zza(2)) {
throw new GeneralSecurityException("Can not use HMAC in FIPS-mode, as BoringCrypto module is not available.");
}
this.zzb = str;
this.zzc = key;
if (key.getEncoded().length < 16) {
throw new InvalidAlgorithmParameterException("key size too small, need at least 16 bytes");
}
switch (str.hashCode()) {
case -1823053428:
if (str.equals("HMACSHA1")) {
c = 0;
break;
}
c = 65535;
break;
case 392315023:
if (str.equals("HMACSHA224")) {
c = 1;
break;
}
c = 65535;
break;
case 392315118:
if (str.equals("HMACSHA256")) {
c = 2;
break;
}
c = 65535;
break;
case 392316170:
if (str.equals("HMACSHA384")) {
c = 3;
break;
}
c = 65535;
break;
case 392317873:
if (str.equals("HMACSHA512")) {
c = 4;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
if (c == 0) {
i = 20;
} else if (c == 1) {
i = 28;
} else if (c == 2) {
i = 32;
} else if (c == 3) {
i = 48;
} else {
if (c != 4) {
throw new NoSuchAlgorithmException("unknown Hmac algorithm: ".concat(str));
}
i = 64;
}
this.zzd = i;
zzgvjVar.get();
}
@Override // com.google.android.gms.internal.ads.zzgpy
public final byte[] zza(byte[] bArr, int i) throws GeneralSecurityException {
if (i > this.zzd) {
throw new InvalidAlgorithmParameterException("tag size too big");
}
((Mac) this.zza.get()).update(bArr);
return Arrays.copyOf(((Mac) this.zza.get()).doFinal(), i);
}
}