package ma;

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

/* JADX INFO: loaded from: classes2.dex */
public final class f0 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final HashMap f30514a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final HashMap f30515b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final boolean f30516c;

    public f0(n5.s sVar) {
        this.f30514a = new HashMap((Map) sVar.f30880b);
        this.f30515b = new HashMap((Map) sVar.f30881c);
        this.f30516c = sVar.f30879a;
    }

    public final Object a(com.bumptech.glide.g gVar, Class cls) {
        if (!this.f30516c || !(gVar instanceof j)) {
            return b(gVar, cls);
        }
        t tVar = t.f30555b;
        h0 h0Var = ((j) gVar).f30530b;
        j.S(h0Var);
        return b(tVar.a(h0Var), cls);
    }

    public final Object b(com.bumptech.glide.g gVar, Class cls) throws GeneralSecurityException {
        e0 e0Var = new e0(gVar.getClass(), cls);
        HashMap map = this.f30514a;
        if (map.containsKey(e0Var)) {
            return ((c0) map.get(e0Var)).f30505c.e(gVar);
        }
        throw new GeneralSecurityException("No PrimitiveConstructor for " + e0Var + " available, see https://developers.google.com/tink/faq/registration_errors");
    }
}
