package ma;

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

/* JADX INFO: loaded from: classes2.dex */
public final class j extends com.bumptech.glide.g {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final h0 f30530b;

    public j(h0 h0Var) {
        h0Var.f30523d.ordinal();
        this.f30530b = h0Var;
    }

    public static void S(h0 h0Var) {
        h0Var.f30523d.ordinal();
    }

    public final ta.a R() throws GeneralSecurityException {
        h0 h0Var = this.f30530b;
        if (h0Var.f30524e.equals(OutputPrefixType.RAW)) {
            return ta.a.a(new byte[0]);
        }
        OutputPrefixType outputPrefixType = OutputPrefixType.TINK;
        OutputPrefixType outputPrefixType2 = h0Var.f30524e;
        boolean zEquals = outputPrefixType2.equals(outputPrefixType);
        Integer num = h0Var.f30525f;
        if (zEquals) {
            return u.b(num.intValue());
        }
        if (outputPrefixType2.equals(OutputPrefixType.LEGACY) || outputPrefixType2.equals(OutputPrefixType.CRUNCHY)) {
            return u.a(num.intValue());
        }
        throw new GeneralSecurityException("Unknown output prefix type");
    }

    @Override // com.bumptech.glide.g
    public final Integer i() {
        return this.f30530b.f30525f;
    }

    @Override // com.bumptech.glide.g
    public final da.l j() {
        h0 h0Var = this.f30530b;
        return new i(h0Var.f30520a, h0Var.f30524e);
    }
}
