package fa;

import com.google.crypto.tink.proto.OutputPrefixType;
import ea.u0;
import ea.w0;
import ea.x0;
import java.security.GeneralSecurityException;
import ma.p0;
import ma.v;
import ma.x;

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

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

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

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

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

    static {
        ta.a aVarC = p0.c("type.googleapis.com/google.crypto.tink.XChaCha20Poly1305Key");
        f26034a = new x(new h(6), x0.class);
        f26035b = new v(new h(7), aVarC);
        f26036c = new ma.f(new h(8), u0.class);
        f26037d = new ma.d(new h(9), aVarC);
    }

    public static OutputPrefixType a(w0 w0Var) throws GeneralSecurityException {
        if (w0.f25783b.equals(w0Var)) {
            return OutputPrefixType.TINK;
        }
        if (w0.f25784c.equals(w0Var)) {
            return OutputPrefixType.CRUNCHY;
        }
        if (w0.f25785d.equals(w0Var)) {
            return OutputPrefixType.RAW;
        }
        throw new GeneralSecurityException("Unable to serialize variant: " + w0Var);
    }

    public static w0 b(OutputPrefixType outputPrefixType) throws GeneralSecurityException {
        int iOrdinal = outputPrefixType.ordinal();
        if (iOrdinal == 1) {
            return w0.f25783b;
        }
        if (iOrdinal != 2) {
            if (iOrdinal == 3) {
                return w0.f25785d;
            }
            if (iOrdinal != 4) {
                throw new GeneralSecurityException("Unable to parse OutputPrefixType: " + outputPrefixType.b());
            }
        }
        return w0.f25784c;
    }
}
