package J3;

import U3.i;
import Z.g;
import java.security.GeneralSecurityException;
import java.security.SecureRandom;
import java.text.SimpleDateFormat;
import java.util.Locale;
import java.util.Random;
import javax.crypto.Cipher;
import n4.u0;

/* JADX INFO: loaded from: classes.dex */
public final class b extends ThreadLocal {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f3468a;

    @Override // java.lang.ThreadLocal
    public final Object initialValue() {
        switch (this.f3468a) {
            case u0.f15495q /* 0 */:
                try {
                    return (Cipher) i.f6713b.f6715a.a("AES/GCM/NoPadding");
                } catch (GeneralSecurityException e8) {
                    throw new IllegalStateException(e8);
                }
            case 1:
                try {
                    return (Cipher) i.f6713b.f6715a.a("AES/GCM-SIV/NoPadding");
                } catch (GeneralSecurityException e9) {
                    throw new IllegalStateException(e9);
                }
            case 2:
                return new Random();
            case 3:
                try {
                    return (Cipher) i.f6713b.f6715a.a("AES/CTR/NoPadding");
                } catch (GeneralSecurityException e10) {
                    throw new IllegalStateException(e10);
                }
            case 4:
                try {
                    return (Cipher) i.f6713b.f6715a.a("AES/ECB/NOPADDING");
                } catch (GeneralSecurityException e11) {
                    throw new IllegalStateException(e11);
                }
            case 5:
                try {
                    return (Cipher) i.f6713b.f6715a.a("AES/CTR/NOPADDING");
                } catch (GeneralSecurityException e12) {
                    throw new IllegalStateException(e12);
                }
            case g.STRING_SET_FIELD_NUMBER /* 6 */:
                SecureRandom secureRandom = new SecureRandom();
                secureRandom.nextLong();
                return secureRandom;
            case g.DOUBLE_FIELD_NUMBER /* 7 */:
                return 0L;
            default:
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
                simpleDateFormat.setLenient(false);
                simpleDateFormat.setTimeZone(l7.b.f14416e);
                return simpleDateFormat;
        }
    }
}
