package g2;

import java.io.IOException;
import java.util.Enumeration;
import java.util.NoSuchElementException;

/* JADX INFO: compiled from: LazyConstructionEnumeration.java */
/* JADX INFO: loaded from: classes.dex */
class u1 implements Enumeration {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private j f4751a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private Object f4752b = a();

    public u1(byte[] bArr) {
        this.f4751a = new j(bArr, true);
    }

    private Object a() {
        try {
            return this.f4751a.h();
        } catch (IOException e3) {
            throw new r("malformed DER construction: " + e3, e3);
        }
    }

    @Override // java.util.Enumeration
    public boolean hasMoreElements() {
        return this.f4752b != null;
    }

    @Override // java.util.Enumeration
    public Object nextElement() {
        Object obj = this.f4752b;
        if (obj == null) {
            throw new NoSuchElementException();
        }
        this.f4752b = a();
        return obj;
    }
}
