package ea;

import com.google.android.gms.internal.atv_ads_framework.d1;
import com.google.crypto.tink.config.internal.TinkFipsUtil$AlgorithmFipsCompatibility;
import java.security.GeneralSecurityException;
import java.util.Collections;
import java.util.HashMap;
import ra.q1;

/* JADX INFO: loaded from: classes2.dex */
public abstract class a {
    static {
        int i10 = q1.CONFIG_NAME_FIELD_NUMBER;
        try {
            a();
        } catch (GeneralSecurityException e10) {
            throw new ExceptionInInitializerError(e10);
        }
    }

    public static void a() {
        ma.s sVar = ma.s.f30553b;
        sVar.b(f.f25649a);
        sVar.a(f.f25650b);
        na.m.a();
        TinkFipsUtil$AlgorithmFipsCompatibility tinkFipsUtil$AlgorithmFipsCompatibility = j.f25672e;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility.a()) {
            throw new GeneralSecurityException("Can not use AES-CTR-HMAC in FIPS-mode, as BoringCrypto module is not available.");
        }
        ma.x xVar = fa.a.f25980a;
        ma.t tVar = ma.t.f30555b;
        tVar.f(fa.a.f25980a);
        tVar.e(fa.a.f25981b);
        tVar.d(fa.a.f25982c);
        tVar.c(fa.a.f25983d);
        sVar.a(j.f25668a);
        ma.r rVar = ma.r.f30551b;
        HashMap map = new HashMap();
        map.put("AES128_CTR_HMAC_SHA256", p0.f25729e);
        l.b0 b0VarB = m.b();
        b0VarB.g(16);
        b0VarB.i(32);
        b0VarB.l(16);
        b0VarB.j(16);
        k kVar = k.f25679d;
        b0VarB.f29643e = kVar;
        l lVar = l.f25688d;
        b0VarB.f29644f = lVar;
        map.put("AES128_CTR_HMAC_SHA256_RAW", b0VarB.c());
        map.put("AES256_CTR_HMAC_SHA256", p0.f25730f);
        l.b0 b0VarB2 = m.b();
        b0VarB2.g(32);
        b0VarB2.i(32);
        b0VarB2.l(32);
        b0VarB2.j(16);
        b0VarB2.f29643e = kVar;
        b0VarB2.f29644f = lVar;
        map.put("AES256_CTR_HMAC_SHA256_RAW", b0VarB2.c());
        rVar.b(Collections.unmodifiableMap(map));
        ma.o oVar = ma.o.f30545b;
        oVar.a(j.f25670c, m.class);
        ma.m mVar = ma.m.f30537b;
        mVar.a(j.f25671d, m.class);
        ma.c cVar = ma.c.f30500d;
        cVar.e(j.f25669b, tinkFipsUtil$AlgorithmFipsCompatibility);
        TinkFipsUtil$AlgorithmFipsCompatibility tinkFipsUtil$AlgorithmFipsCompatibility2 = s.f25753e;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility2.a()) {
            throw new GeneralSecurityException("Can not use AES-GCM in FIPS-mode, as BoringCrypto module is not available.");
        }
        tVar.f(fa.d.f25989a);
        tVar.e(fa.d.f25990b);
        tVar.d(fa.d.f25991c);
        tVar.c(fa.d.f25992d);
        sVar.a(s.f25749a);
        HashMap map2 = new HashMap();
        map2.put("AES128_GCM", p0.f25725a);
        u.e eVarB = u.b();
        eVarB.i();
        eVarB.l(16);
        eVarB.n();
        t tVar2 = t.f25759d;
        eVarB.f33128d = tVar2;
        map2.put("AES128_GCM_RAW", eVarB.d());
        map2.put("AES256_GCM", p0.f25726b);
        u.e eVarB2 = u.b();
        eVarB2.i();
        eVarB2.l(32);
        eVarB2.n();
        eVarB2.f33128d = tVar2;
        map2.put("AES256_GCM_RAW", eVarB2.d());
        rVar.b(Collections.unmodifiableMap(map2));
        oVar.a(s.f25751c, u.class);
        mVar.a(s.f25752d, u.class);
        cVar.e(s.f25750b, tinkFipsUtil$AlgorithmFipsCompatibility2);
        if (ia.a.f26591b.get()) {
            return;
        }
        ma.c0 c0Var = o.f25714a;
        TinkFipsUtil$AlgorithmFipsCompatibility tinkFipsUtil$AlgorithmFipsCompatibility3 = TinkFipsUtil$AlgorithmFipsCompatibility.f23814a;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility3.a()) {
            throw new GeneralSecurityException("Registering AES EAX is not supported in FIPS mode");
        }
        tVar.f(fa.b.f25984a);
        tVar.e(fa.b.f25985b);
        tVar.d(fa.b.f25986c);
        tVar.c(fa.b.f25987d);
        sVar.a(o.f25714a);
        HashMap map3 = new HashMap();
        map3.put("AES128_EAX", p0.f25727c);
        u.e eVarB3 = q.b();
        eVarB3.j(16);
        eVarB3.k(16);
        eVarB3.m();
        p pVar = p.f25723d;
        eVarB3.f33128d = pVar;
        map3.put("AES128_EAX_RAW", eVarB3.b());
        map3.put("AES256_EAX", p0.f25728d);
        u.e eVarB4 = q.b();
        eVarB4.j(16);
        eVarB4.k(32);
        eVarB4.m();
        eVarB4.f33128d = pVar;
        map3.put("AES256_EAX_RAW", eVarB4.b());
        rVar.b(Collections.unmodifiableMap(map3));
        mVar.a(o.f25716c, q.class);
        cVar.d(o.f25715b);
        ma.c0 c0Var2 = w.f25779a;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility3.a()) {
            throw new GeneralSecurityException("Registering AES GCM SIV is not supported in FIPS mode");
        }
        tVar.f(fa.f.f26001a);
        tVar.e(fa.f.f26002b);
        tVar.d(fa.f.f26003c);
        tVar.c(fa.f.f26004d);
        HashMap map4 = new HashMap();
        d1 d1Var = new d1();
        d1Var.p(16);
        x xVar2 = x.f25787b;
        d1Var.f19915c = xVar2;
        map4.put("AES128_GCM_SIV", d1Var.e());
        d1 d1Var2 = new d1();
        d1Var2.p(16);
        x xVar3 = x.f25789d;
        d1Var2.f19915c = xVar3;
        map4.put("AES128_GCM_SIV_RAW", d1Var2.e());
        d1 d1Var3 = new d1();
        d1Var3.p(32);
        d1Var3.f19915c = xVar2;
        map4.put("AES256_GCM_SIV", d1Var3.e());
        d1 d1Var4 = new d1();
        d1Var4.p(32);
        d1Var4.f19915c = xVar3;
        map4.put("AES256_GCM_SIV_RAW", d1Var4.e());
        rVar.b(Collections.unmodifiableMap(map4));
        oVar.a(w.f25781c, y.class);
        mVar.a(w.f25780b, y.class);
        sVar.a(w.f25779a);
        cVar.d(w.f25782d);
        ma.c0 c0Var3 = a0.f25627a;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility3.a()) {
            throw new GeneralSecurityException("Registering ChaCha20Poly1305 is not supported in FIPS mode");
        }
        tVar.f(fa.i.f26012a);
        tVar.e(fa.i.f26013b);
        tVar.d(fa.i.f26014c);
        tVar.c(fa.i.f26015d);
        ma.s sVar2 = ma.s.f30553b;
        sVar2.a(a0.f25627a);
        mVar.a(a0.f25628b, c0.class);
        HashMap map5 = new HashMap();
        map5.put("CHACHA20_POLY1305", new c0(b0.f25630b));
        map5.put("CHACHA20_POLY1305_RAW", new c0(b0.f25632d));
        rVar.b(Collections.unmodifiableMap(map5));
        cVar.d(a0.f25629c);
        ma.c0 c0Var4 = d0.f25637a;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility3.a()) {
            throw new GeneralSecurityException("Registering KMS AEAD is not supported in FIPS mode");
        }
        tVar.f(j0.f25673a);
        tVar.e(j0.f25674b);
        tVar.d(j0.f25675c);
        tVar.c(j0.f25676d);
        sVar2.a(d0.f25637a);
        mVar.a(d0.f25639c, i0.class);
        cVar.d(d0.f25638b);
        ma.h hVar = f0.f25651a;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility3.a()) {
            throw new GeneralSecurityException("Registering KMS Envelope AEAD is not supported in FIPS mode");
        }
        tVar.f(o0.f25717a);
        tVar.e(o0.f25718b);
        tVar.d(o0.f25719c);
        tVar.c(o0.f25720d);
        mVar.a(f0.f25652b, n0.class);
        sVar2.a(f0.f25653c);
        cVar.d(f0.f25651a);
        ma.c0 c0Var5 = v0.f25775a;
        if (!tinkFipsUtil$AlgorithmFipsCompatibility3.a()) {
            throw new GeneralSecurityException("Registering XChaCha20Poly1305 is not supported in FIPS mode");
        }
        tVar.f(fa.t.f26034a);
        tVar.e(fa.t.f26035b);
        tVar.d(fa.t.f26036c);
        tVar.c(fa.t.f26037d);
        sVar2.a(v0.f25775a);
        ma.r rVar2 = ma.r.f30551b;
        HashMap map6 = new HashMap();
        map6.put("XCHACHA20_POLY1305", new x0(w0.f25783b));
        map6.put("XCHACHA20_POLY1305_RAW", new x0(w0.f25785d));
        rVar2.b(Collections.unmodifiableMap(map6));
        mVar.a(v0.f25778d, x0.class);
        oVar.a(v0.f25777c, x0.class);
        cVar.d(v0.f25776b);
        tVar.f(fa.r.f26027a);
        tVar.e(fa.r.f26028b);
        tVar.d(fa.r.f26029c);
        tVar.c(fa.r.f26030d);
        HashMap map7 = new HashMap();
        map7.put("XAES_256_GCM_192_BIT_NONCE", p0.f25731g);
        map7.put("XAES_256_GCM_192_BIT_NONCE_NO_PREFIX", p0.f25732h);
        map7.put("XAES_256_GCM_160_BIT_NONCE_NO_PREFIX", p0.f25733i);
        map7.put("X_AES_GCM_8_BYTE_SALT_NO_PREFIX", p0.f25734j);
        rVar2.b(Collections.unmodifiableMap(map7));
        sVar2.a(r0.f25748b);
        mVar.a(r0.f25747a, t0.class);
    }
}
