package ea;

import com.google.crypto.tink.proto.OutputPrefixType;
import java.security.GeneralSecurityException;

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

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

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

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

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

    static {
        ta.a aVarC = ma.p0.c("type.googleapis.com/google.crypto.tink.KmsAeadKey");
        f25673a = new ma.x(new c7.g(23), i0.class);
        f25674b = new ma.v(new c7.g(24), aVarC);
        f25675c = new ma.f(new c7.g(25), g0.class);
        f25676d = new ma.d(new c7.g(26), aVarC);
    }

    public static OutputPrefixType a(h0 h0Var) throws GeneralSecurityException {
        if (h0.f25662b.equals(h0Var)) {
            return OutputPrefixType.TINK;
        }
        if (h0.f25663c.equals(h0Var)) {
            return OutputPrefixType.RAW;
        }
        throw new GeneralSecurityException("Unable to serialize variant: " + h0Var);
    }

    public static h0 b(OutputPrefixType outputPrefixType) throws GeneralSecurityException {
        int iOrdinal = outputPrefixType.ordinal();
        if (iOrdinal == 1) {
            return h0.f25662b;
        }
        if (iOrdinal == 3) {
            return h0.f25663c;
        }
        throw new GeneralSecurityException("Unable to parse OutputPrefixType: " + outputPrefixType.b());
    }
}
