package com.google.android.gms.internal.ads; import java.lang.reflect.InvocationTargetException; import java.security.GeneralSecurityException; import java.security.Provider; import java.security.SecureRandom; /* loaded from: classes3.dex */ public final class zzgnk { private static final ThreadLocal zza = new zzgnj(); public static /* synthetic */ SecureRandom zza() { SecureRandom zzc = zzc(); zzc.nextLong(); return zzc; } public static byte[] zzb(int i) { byte[] bArr = new byte[i]; ((SecureRandom) zza.get()).nextBytes(bArr); return bArr; } private static SecureRandom zzc() { Provider zza2 = zzgku.zza(); if (zza2 != null) { try { return SecureRandom.getInstance("SHA1PRNG", zza2); } catch (GeneralSecurityException unused) { } } Provider provider = null; try { provider = (Provider) Class.forName("org.conscrypt.Conscrypt").getMethod("newProvider", new Class[0]).invoke(null, new Object[0]); } catch (ClassNotFoundException | IllegalAccessException | IllegalArgumentException | NoSuchMethodException | InvocationTargetException unused2) { } if (provider != null) { try { return SecureRandom.getInstance("SHA1PRNG", provider); } catch (GeneralSecurityException unused3) { } } return new SecureRandom(); } }