- 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
71 lines
2.9 KiB
Java
71 lines
2.9 KiB
Java
package com.google.android.gms.internal.ads;
|
|
|
|
import android.util.Base64;
|
|
import androidx.annotation.VisibleForTesting;
|
|
import java.io.ByteArrayOutputStream;
|
|
import java.io.IOException;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.security.GeneralSecurityException;
|
|
|
|
/* loaded from: classes3.dex */
|
|
public final class zzfcy {
|
|
@VisibleForTesting
|
|
public zzfcy() {
|
|
try {
|
|
zzges.zza();
|
|
} catch (GeneralSecurityException e) {
|
|
com.google.android.gms.ads.internal.util.zze.zza("Failed to Configure Aead. ".concat(e.toString()));
|
|
com.google.android.gms.ads.internal.zzv.zzp().zzw(e, "CryptoUtils.registerAead");
|
|
}
|
|
}
|
|
|
|
public static final String zza() {
|
|
byte[] bArr;
|
|
try {
|
|
zzgeg zzb = zzgeg.zzb(zzgea.zza(zzgmg.zzb().zza("AES128_GCM")));
|
|
try {
|
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
|
zzgdq.zzb(zzb, zzgdp.zzb(byteArrayOutputStream));
|
|
bArr = byteArrayOutputStream.toByteArray();
|
|
} catch (IOException unused) {
|
|
throw new GeneralSecurityException("Serialize keyset failed");
|
|
}
|
|
} catch (GeneralSecurityException e) {
|
|
com.google.android.gms.ads.internal.util.zze.zza("Failed to generate key".concat(e.toString()));
|
|
com.google.android.gms.ads.internal.zzv.zzp().zzw(e, "CryptoUtils.generateKey");
|
|
bArr = new byte[0];
|
|
}
|
|
return Base64.encodeToString(bArr, 11);
|
|
}
|
|
|
|
public static final String zzb(byte[] bArr, byte[] bArr2, String str, zzdrq zzdrqVar) {
|
|
zzgeg zzc;
|
|
if (str != null && (zzc = zzc(str)) != null) {
|
|
try {
|
|
byte[] zza = ((zzgdn) zzc.zzd(zzgnl.zzd(), zzgdn.class)).zza(bArr, bArr2);
|
|
zzdrqVar.zzb().put("ds", "1");
|
|
return new String(zza, "UTF-8");
|
|
} catch (UnsupportedEncodingException | UnsupportedOperationException | GeneralSecurityException e) {
|
|
com.google.android.gms.ads.internal.util.zze.zza("Failed to decrypt ".concat(e.toString()));
|
|
com.google.android.gms.ads.internal.zzv.zzp().zzw(e, "CryptoUtils.decrypt");
|
|
zzdrqVar.zzb().put("dsf", e.toString());
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
|
|
private static final zzgeg zzc(String str) {
|
|
try {
|
|
try {
|
|
return zzgdq.zza(zzgdo.zzb(Base64.decode(str, 11)));
|
|
} catch (IOException unused) {
|
|
throw new GeneralSecurityException("Parse keyset failed");
|
|
}
|
|
} catch (GeneralSecurityException e) {
|
|
com.google.android.gms.ads.internal.util.zze.zza("Failed to get keysethandle".concat(e.toString()));
|
|
com.google.android.gms.ads.internal.zzv.zzp().zzw(e, "CryptoUtils.getHandle");
|
|
return null;
|
|
}
|
|
}
|
|
}
|