what-the-bank/sources/org/bouncycastle/asn1/BERSet.java

47 lines
1.4 KiB
Java

package org.bouncycastle.asn1;
import java.io.IOException;
import java.util.Enumeration;
/* loaded from: classes6.dex */
public class BERSet extends ASN1Set {
/* JADX INFO: Access modifiers changed from: package-private */
@Override // org.bouncycastle.asn1.ASN1Primitive
public int encodedLength() throws IOException {
Enumeration objects = getObjects();
int i = 0;
while (objects.hasMoreElements()) {
i += ((ASN1Encodable) objects.nextElement()).toASN1Primitive().encodedLength();
}
return i + 4;
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // org.bouncycastle.asn1.ASN1Set, org.bouncycastle.asn1.ASN1Primitive
public void encode(ASN1OutputStream aSN1OutputStream) throws IOException {
aSN1OutputStream.write(49);
aSN1OutputStream.write(128);
Enumeration objects = getObjects();
while (objects.hasMoreElements()) {
aSN1OutputStream.writeObject((ASN1Encodable) objects.nextElement());
}
aSN1OutputStream.write(0);
aSN1OutputStream.write(0);
}
public BERSet(ASN1Encodable[] aSN1EncodableArr) {
super(aSN1EncodableArr, false);
}
public BERSet(ASN1EncodableVector aSN1EncodableVector) {
super(aSN1EncodableVector, false);
}
public BERSet(ASN1Encodable aSN1Encodable) {
super(aSN1Encodable);
}
public BERSet() {
}
}