package o; import java.security.GeneralSecurityException; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.logging.Logger; /* renamed from: o.Wem, reason: case insensitive filesystem */ /* loaded from: classes2.dex */ public final class C1128Wem { static final Logger b = Logger.getLogger(C1128Wem.class.getName()); final ConcurrentMap d; /* JADX INFO: Access modifiers changed from: package-private */ /* renamed from: o.Wem$LWm */ /* loaded from: classes2.dex */ public interface LWm { Class a(); Set> b();

RQY

b(Class

cls) throws GeneralSecurityException; RQY e(); } /* JADX INFO: Access modifiers changed from: package-private */ public C1128Wem(C1128Wem c1128Wem) { this.d = new ConcurrentHashMap(c1128Wem.d); } /* JADX INFO: Access modifiers changed from: package-private */ public C1128Wem() { this.d = new ConcurrentHashMap(); } /* JADX INFO: Access modifiers changed from: package-private */ public final LWm b(String str) throws GeneralSecurityException { LWm lWm; synchronized (this) { if (!this.d.containsKey(str)) { StringBuilder sb = new StringBuilder("No key manager found for key type "); sb.append(str); throw new GeneralSecurityException(sb.toString()); } lWm = this.d.get(str); } return lWm; } private static String d(Set> set) { StringBuilder sb = new StringBuilder(); boolean z = true; for (Class cls : set) { if (!z) { sb.append(", "); } sb.append(cls.getCanonicalName()); z = false; } return sb.toString(); } /* JADX INFO: Access modifiers changed from: package-private */ public final

RQY

c(String str, Class

cls) throws GeneralSecurityException { LWm b2 = b(str); if (cls == null) { return (RQY

) b2.e(); } if (b2.b().contains(cls)) { return b2.b(cls); } StringBuilder sb = new StringBuilder("Primitive type "); sb.append(cls.getName()); sb.append(" not supported by key manager of type "); sb.append(b2.a()); sb.append(", supported primitives: "); sb.append(d(b2.b())); throw new GeneralSecurityException(sb.toString()); } }