what-the-bank/sources/org/bouncycastle/asn1/LazyConstructionEnumeration...

35 lines
913 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1;
import java.io.IOException;
import java.util.Enumeration;
/* loaded from: classes6.dex */
class LazyConstructionEnumeration implements Enumeration {
private ASN1InputStream aIn;
private Object nextObj = readObject();
@Override // java.util.Enumeration
public Object nextElement() {
Object obj = this.nextObj;
this.nextObj = readObject();
return obj;
}
@Override // java.util.Enumeration
public boolean hasMoreElements() {
return this.nextObj != null;
}
private Object readObject() {
try {
return this.aIn.readObject();
} catch (IOException e) {
throw new ASN1ParsingException("malformed DER construction: ".concat(String.valueOf(e)), e);
}
}
public LazyConstructionEnumeration(byte[] bArr) {
this.aIn = new ASN1InputStream(bArr, true);
}
}