- 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
47 lines
1.7 KiB
Java
47 lines
1.7 KiB
Java
package com.google.android.gms.internal.ads;
|
|
|
|
import java.security.GeneralSecurityException;
|
|
import java.security.spec.AlgorithmParameterSpec;
|
|
import javax.crypto.Cipher;
|
|
import javax.crypto.SecretKey;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class zzgun implements zzgdn {
|
|
private final SecretKey zza;
|
|
private final byte[] zzb;
|
|
|
|
private zzgun(byte[] bArr, zzgvo zzgvoVar) throws GeneralSecurityException {
|
|
if (!zzgks.zza(2)) {
|
|
throw new GeneralSecurityException("Can not use AES-GCM in FIPS-mode, as BoringCrypto module is not available.");
|
|
}
|
|
this.zza = zzgjd.zzc(bArr);
|
|
this.zzb = zzgvoVar.zzc();
|
|
}
|
|
|
|
public static zzgdn zzb(zzgfx zzgfxVar) throws GeneralSecurityException {
|
|
return new zzgun(zzgfxVar.zzd().zzd(zzgdw.zza()), zzgfxVar.zzc());
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.ads.zzgdn
|
|
public final byte[] zza(byte[] bArr, byte[] bArr2) throws GeneralSecurityException {
|
|
if (bArr == null) {
|
|
throw new NullPointerException("ciphertext is null");
|
|
}
|
|
byte[] bArr3 = this.zzb;
|
|
if (bArr.length < bArr3.length + 28) {
|
|
throw new GeneralSecurityException("ciphertext too short");
|
|
}
|
|
if (!zzgnu.zzc(bArr3, bArr)) {
|
|
throw new GeneralSecurityException("Decryption failed (OutputPrefix mismatch).");
|
|
}
|
|
AlgorithmParameterSpec zza = zzgjd.zza(bArr, this.zzb.length, 12);
|
|
SecretKey secretKey = this.zza;
|
|
Cipher zzb = zzgjd.zzb();
|
|
zzb.init(2, secretKey, zza);
|
|
if (bArr2 != null && bArr2.length != 0) {
|
|
zzb.updateAAD(bArr2);
|
|
}
|
|
return zzb.doFinal(bArr, this.zzb.length + 12, (r1 - r7) - 12);
|
|
}
|
|
}
|