package oa;

import com.google.crypto.tink.proto.OutputPrefixType;
import java.security.GeneralSecurityException;
import ma.f;
import ma.p0;
import ma.v;
import ma.x;

/* JADX INFO: loaded from: classes2.dex */
public abstract class b {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public static final x f31444a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final v f31445b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final f f31446c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final ma.d f31447d;

    static {
        ta.a aVarC = p0.c("type.googleapis.com/google.crypto.tink.AesCmacKey");
        f31444a = new x(new a(0), na.d.class);
        f31445b = new v(new a(1), aVarC);
        f31446c = new f(new a(2), na.a.class);
        f31447d = new ma.d(new a(3), aVarC);
    }

    public static OutputPrefixType a(na.c cVar) throws GeneralSecurityException {
        if (na.c.f31133b.equals(cVar)) {
            return OutputPrefixType.TINK;
        }
        if (na.c.f31134c.equals(cVar)) {
            return OutputPrefixType.CRUNCHY;
        }
        if (na.c.f31136e.equals(cVar)) {
            return OutputPrefixType.RAW;
        }
        if (na.c.f31135d.equals(cVar)) {
            return OutputPrefixType.LEGACY;
        }
        throw new GeneralSecurityException("Unable to serialize variant: " + cVar);
    }

    public static na.c b(OutputPrefixType outputPrefixType) throws GeneralSecurityException {
        int iOrdinal = outputPrefixType.ordinal();
        if (iOrdinal == 1) {
            return na.c.f31133b;
        }
        if (iOrdinal == 2) {
            return na.c.f31135d;
        }
        if (iOrdinal == 3) {
            return na.c.f31136e;
        }
        if (iOrdinal == 4) {
            return na.c.f31134c;
        }
        throw new GeneralSecurityException("Unable to parse OutputPrefixType: " + outputPrefixType.b());
    }
}
