package defpackage;

import j$.util.concurrent.ConcurrentHashMap;
import java.security.GeneralSecurityException;
import java.util.logging.Logger;

/* JADX INFO: renamed from: ˉˏˉ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1193 {

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public static final Logger f5082 = Logger.getLogger(C1193.class.getName());

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public static final C1193 f5083;

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public ConcurrentHashMap f5084;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public ConcurrentHashMap f5085;

    static {
        C1193 c1193 = new C1193();
        c1193.f5085 = new ConcurrentHashMap();
        c1193.f5084 = new ConcurrentHashMap();
        f5083 = c1193;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final synchronized C4425 m3680(String str) {
        if (!this.f5085.containsKey(str)) {
            throw new GeneralSecurityException("No key manager found for key type " + str + ", see https://developers.google.com/tink/faq/registration_errors");
        }
        return (C4425) this.f5085.get(str);
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final synchronized void m3681(C4425 c4425) {
        try {
            String str = c4425.f16831;
            if (this.f5084.containsKey(str) && !((Boolean) this.f5084.get(str)).booleanValue()) {
                throw new GeneralSecurityException("New keys are already disallowed for key type ".concat(str));
            }
            if (((C4425) this.f5085.get(str)) != null && !C4425.class.equals(C4425.class)) {
                f5082.warning("Attempted overwrite of a registered key manager for key type ".concat(str));
                throw new GeneralSecurityException("typeUrl (" + str + ") is already registered with " + C4425.class.getName() + ", cannot be re-registered with " + C4425.class.getName());
            }
            this.f5085.putIfAbsent(str, c4425);
            this.f5084.put(str, Boolean.TRUE);
        } catch (Throwable th) {
            throw th;
        }
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final synchronized void m3682(C4425 c4425, int i) {
        if (!(i != 1 ? AbstractC2704.m6531(i) : AbstractC2704.m6538(i))) {
            throw new GeneralSecurityException("Cannot register key manager: FIPS compatibility insufficient");
        }
        m3681(c4425);
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C4425 m3683(Class cls, String str) throws GeneralSecurityException {
        C4425 c4425M3680 = m3680(str);
        if (c4425M3680.f16829.equals(cls)) {
            return c4425M3680;
        }
        StringBuilder sb = new StringBuilder("Primitive type ");
        sb.append(cls.getName());
        sb.append(" not supported by key manager of type ");
        sb.append(C4425.class);
        Class cls2 = c4425M3680.f16829;
        sb.append(", which only supports: ");
        sb.append(cls2);
        throw new GeneralSecurityException(sb.toString());
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final synchronized void m3684(C4425 c4425) {
        m3682(c4425, 1);
    }
}
