what-the-bank/sources/org/bouncycastle/asn1/BERSequence.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 BERSequence extends ASN1Sequence {
/* 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.ASN1Sequence, org.bouncycastle.asn1.ASN1Primitive
public void encode(ASN1OutputStream aSN1OutputStream) throws IOException {
aSN1OutputStream.write(48);
aSN1OutputStream.write(128);
Enumeration objects = getObjects();
while (objects.hasMoreElements()) {
aSN1OutputStream.writeObject((ASN1Encodable) objects.nextElement());
}
aSN1OutputStream.write(0);
aSN1OutputStream.write(0);
}
public BERSequence(ASN1Encodable[] aSN1EncodableArr) {
super(aSN1EncodableArr);
}
public BERSequence(ASN1EncodableVector aSN1EncodableVector) {
super(aSN1EncodableVector);
}
public BERSequence(ASN1Encodable aSN1Encodable) {
super(aSN1Encodable);
}
public BERSequence() {
}
}