package com.google.android.gms.internal.ads;

import java.security.GeneralSecurityException;
import java.util.Collections;
import java.util.HashMap;

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

    public static void a() {
        nw1 nw1Var = nw1.f14753a;
        s02 s02Var = s02.f16272b;
        s02Var.b(nw1.f14753a);
        s02Var.a(nw1.f14754b);
        g22.a();
        int i10 = rw1.f16246e;
        if (!ih1.z(i10)) {
            throw new GeneralSecurityException("Can not use AES-CTR-HMAC in FIPS-mode, as BoringCrypto module is not available.");
        }
        x02 x02Var = qy1.f15897a;
        t02 t02Var = t02.f16664b;
        t02Var.c(qy1.f15897a);
        t02Var.d(qy1.f15898b);
        t02Var.a(qy1.f15899c);
        t02Var.b(qy1.f15900d);
        s02Var.a(rw1.f16242a);
        r02 r02Var = r02.f15944b;
        HashMap map = new HashMap();
        map.put("AES128_CTR_HMAC_SHA256", fy1.f11422e);
        l.b0 b0Var = new l.b0();
        b0Var.m(16);
        b0Var.n(32);
        b0Var.p(16);
        b0Var.o(16);
        sw1 sw1Var = sw1.f16606d;
        b0Var.f29643e = sw1Var;
        tw1 tw1Var = tw1.f17013d;
        b0Var.f29644f = tw1Var;
        map.put("AES128_CTR_HMAC_SHA256_RAW", b0Var.q());
        map.put("AES256_CTR_HMAC_SHA256", fy1.f11423f);
        l.b0 b0Var2 = new l.b0();
        b0Var2.m(32);
        b0Var2.n(32);
        b0Var2.p(32);
        b0Var2.o(16);
        b0Var2.f29643e = sw1Var;
        b0Var2.f29644f = tw1Var;
        map.put("AES256_CTR_HMAC_SHA256_RAW", b0Var2.q());
        r02Var.b(Collections.unmodifiableMap(map));
        n02 n02Var = n02.f14395b;
        n02Var.a(rw1.f16244c, uw1.class);
        l02 l02Var = l02.f13453b;
        l02Var.a(rw1.f16245d, uw1.class);
        yz1 yz1Var = yz1.f19020d;
        yz1Var.c(rw1.f16243b, i10, true);
        int i11 = dx1.f10551e;
        if (!ih1.z(i11)) {
            throw new GeneralSecurityException("Can not use AES-GCM in FIPS-mode, as BoringCrypto module is not available.");
        }
        t02Var.c(ty1.f17027a);
        t02Var.d(ty1.f17028b);
        t02Var.a(ty1.f17029c);
        t02Var.b(ty1.f17030d);
        s02Var.a(dx1.f10547a);
        HashMap map2 = new HashMap();
        map2.put("AES128_GCM", fy1.f11418a);
        eb ebVar = new eb(17, 0);
        ebVar.k();
        ebVar.f(16);
        ebVar.o();
        ex1 ex1Var = ex1.f10946d;
        ebVar.f10744e = ex1Var;
        map2.put("AES128_GCM_RAW", ebVar.v());
        map2.put("AES256_GCM", fy1.f11419b);
        eb ebVar2 = new eb(17, 0);
        ebVar2.k();
        ebVar2.f(32);
        ebVar2.o();
        ebVar2.f10744e = ex1Var;
        map2.put("AES256_GCM_RAW", ebVar2.v());
        r02Var.b(Collections.unmodifiableMap(map2));
        n02Var.a(dx1.f10549c, fx1.class);
        l02Var.a(dx1.f10550d, fx1.class);
        yz1Var.c(dx1.f10548b, i11, true);
        if (mz1.a()) {
            return;
        }
        b12 b12Var = yw1.f18992a;
        if (!ih1.z(1)) {
            throw new GeneralSecurityException("Registering AES EAX is not supported in FIPS mode");
        }
        t02Var.c(ry1.f16256a);
        t02Var.d(ry1.f16257b);
        t02Var.a(ry1.f16258c);
        t02Var.b(ry1.f16259d);
        s02Var.a(yw1.f18992a);
        HashMap map3 = new HashMap();
        map3.put("AES128_EAX", fy1.f11420c);
        eb ebVar3 = new eb(16, 0);
        ebVar3.l(16);
        ebVar3.g(16);
        ebVar3.p();
        zw1 zw1Var = zw1.f19411d;
        ebVar3.f10744e = zw1Var;
        map3.put("AES128_EAX_RAW", ebVar3.u());
        map3.put("AES256_EAX", fy1.f11421d);
        eb ebVar4 = new eb(16, 0);
        ebVar4.l(16);
        ebVar4.g(32);
        ebVar4.p();
        ebVar4.f10744e = zw1Var;
        map3.put("AES256_EAX_RAW", ebVar4.u());
        r02Var.b(Collections.unmodifiableMap(map3));
        l02Var.a(yw1.f18994c, ax1.class);
        yz1Var.a(yw1.f18993b, true);
        b12 b12Var2 = ix1.f12644a;
        if (!ih1.z(1)) {
            throw new GeneralSecurityException("Registering AES GCM SIV is not supported in FIPS mode");
        }
        t02Var.c(wy1.f18252a);
        t02Var.d(wy1.f18253b);
        t02Var.a(wy1.f18254c);
        t02Var.b(wy1.f18255d);
        HashMap map4 = new HashMap();
        uz0 uz0Var = new uz0(11, (Object) null);
        uz0Var.e(16);
        jx1 jx1Var = jx1.f13033b;
        uz0Var.f17460b = jx1Var;
        map4.put("AES128_GCM_SIV", uz0Var.i());
        uz0 uz0Var2 = new uz0(11, (Object) null);
        uz0Var2.e(16);
        jx1 jx1Var2 = jx1.f13035d;
        uz0Var2.f17460b = jx1Var2;
        map4.put("AES128_GCM_SIV_RAW", uz0Var2.i());
        uz0 uz0Var3 = new uz0(11, (Object) null);
        uz0Var3.e(32);
        uz0Var3.f17460b = jx1Var;
        map4.put("AES256_GCM_SIV", uz0Var3.i());
        uz0 uz0Var4 = new uz0(11, (Object) null);
        uz0Var4.e(32);
        uz0Var4.f17460b = jx1Var2;
        map4.put("AES256_GCM_SIV_RAW", uz0Var4.i());
        r02Var.b(Collections.unmodifiableMap(map4));
        n02Var.a(qw1.f15876c, kx1.class);
        l02Var.a(hx1.f12276a, kx1.class);
        s02Var.a(ix1.f12644a);
        yz1Var.a(ix1.f12645b, true);
        b12 b12Var3 = nx1.f14760a;
        if (!ih1.z(1)) {
            throw new GeneralSecurityException("Registering ChaCha20Poly1305 is not supported in FIPS mode");
        }
        t02Var.c(zy1.f19420a);
        t02Var.d(zy1.f19421b);
        t02Var.a(zy1.f19422c);
        t02Var.b(zy1.f19423d);
        s02Var.a(nx1.f14760a);
        l02Var.a(mx1.f14374a, qx1.class);
        HashMap map5 = new HashMap();
        map5.put("CHACHA20_POLY1305", new qx1(px1.f15543b));
        map5.put("CHACHA20_POLY1305_RAW", new qx1(px1.f15545d));
        r02Var.b(Collections.unmodifiableMap(map5));
        yz1Var.a(nx1.f14761b, true);
        b12 b12Var4 = sx1.f16619a;
        if (!ih1.z(1)) {
            throw new GeneralSecurityException("Registering KMS AEAD is not supported in FIPS mode");
        }
        t02Var.c(yx1.f19006a);
        t02Var.d(yx1.f19007b);
        t02Var.a(yx1.f19008c);
        t02Var.b(yx1.f19009d);
        s02Var.a(sx1.f16619a);
        l02Var.a(sx1.f16621c, xx1.class);
        yz1Var.a(sx1.f16620b, true);
        e02 e02Var = ux1.f17430a;
        if (!ih1.z(1)) {
            throw new GeneralSecurityException("Registering KMS Envelope AEAD is not supported in FIPS mode");
        }
        t02Var.c(ey1.f10957a);
        t02Var.d(ey1.f10958b);
        t02Var.a(ey1.f10959c);
        t02Var.b(ey1.f10960d);
        l02Var.a(ux1.f17431b, cy1.class);
        s02Var.a(ux1.f17432c);
        yz1Var.a(ux1.f17430a, true);
        b12 b12Var5 = ny1.f14769a;
        if (!ih1.z(1)) {
            throw new GeneralSecurityException("Registering XChaCha20Poly1305 is not supported in FIPS mode");
        }
        t02Var.c(iz1.f12656a);
        t02Var.d(iz1.f12657b);
        t02Var.a(iz1.f12658c);
        t02Var.b(iz1.f12659d);
        s02Var.a(ny1.f14769a);
        HashMap map6 = new HashMap();
        map6.put("XCHACHA20_POLY1305", new py1(oy1.f15206b));
        map6.put("XCHACHA20_POLY1305_RAW", new py1(oy1.f15208d));
        r02Var.b(Collections.unmodifiableMap(map6));
        l02Var.a(ny1.f14772d, py1.class);
        n02Var.a(ny1.f14771c, py1.class);
        yz1Var.a(ny1.f14770b, true);
        b12 b12Var6 = iy1.f12650a;
        t02Var.c(gz1.f11964a);
        t02Var.d(gz1.f11965b);
        t02Var.a(gz1.f11966c);
        t02Var.b(gz1.f11967d);
        HashMap map7 = new HashMap();
        map7.put("XAES_256_GCM_192_BIT_NONCE", fy1.f11424g);
        map7.put("XAES_256_GCM_192_BIT_NONCE_NO_PREFIX", fy1.f11425h);
        map7.put("XAES_256_GCM_160_BIT_NONCE_NO_PREFIX", fy1.f11426i);
        map7.put("X_AES_GCM_8_BYTE_SALT_NO_PREFIX", fy1.f11427j);
        r02Var.b(Collections.unmodifiableMap(map7));
        s02Var.a(iy1.f12650a);
        l02Var.a(hy1.f12289a, ky1.class);
    }
}
