what-the-bank/sources/org/bouncycastle/asn1/x509/TargetInformation.java

51 lines
1.5 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.x509;
import java.util.Enumeration;
import org.bouncycastle.asn1.ASN1Object;
import org.bouncycastle.asn1.ASN1Primitive;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.DERSequence;
/* loaded from: classes6.dex */
public class TargetInformation extends ASN1Object {
private ASN1Sequence targets;
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
return this.targets;
}
public Targets[] getTargetsObjects() {
Targets[] targetsArr = new Targets[this.targets.size()];
Enumeration objects = this.targets.getObjects();
int i = 0;
while (objects.hasMoreElements()) {
targetsArr[i] = Targets.getInstance(objects.nextElement());
i++;
}
return targetsArr;
}
public static TargetInformation getInstance(Object obj) {
if (obj instanceof TargetInformation) {
return (TargetInformation) obj;
}
if (obj != null) {
return new TargetInformation(ASN1Sequence.getInstance(obj));
}
return null;
}
public TargetInformation(Target[] targetArr) {
this(new Targets(targetArr));
}
public TargetInformation(Targets targets) {
this.targets = new DERSequence(targets);
}
private TargetInformation(ASN1Sequence aSN1Sequence) {
this.targets = aSN1Sequence;
}
}