package org.bouncycastle.asn1.tsp;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class ArchiveTimeStamp extends org.bouncycastle.asn1.ASN1Object {
    private final org.bouncycastle.asn1.x509.AlgorithmIdentifier a;
    private final org.bouncycastle.asn1.cms.Attributes b;
    private final org.bouncycastle.asn1.ASN1Sequence c;
    private final org.bouncycastle.asn1.cms.ContentInfo d;

    @Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
    public org.bouncycastle.asn1.ASN1Primitive j() {
        org.bouncycastle.asn1.ASN1EncodableVector aSN1EncodableVector = new org.bouncycastle.asn1.ASN1EncodableVector(4);
        org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier = this.a;
        if (algorithmIdentifier != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(false, 0, algorithmIdentifier));
        }
        org.bouncycastle.asn1.cms.Attributes attributes = this.b;
        if (attributes != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(false, 1, attributes));
        }
        org.bouncycastle.asn1.ASN1Sequence aSN1Sequence = this.c;
        if (aSN1Sequence != null) {
            aSN1EncodableVector.a(new org.bouncycastle.asn1.DERTaggedObject(false, 2, aSN1Sequence));
        }
        aSN1EncodableVector.a(this.d);
        return new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector);
    }

    public org.bouncycastle.asn1.tsp.PartialHashtree[] n() {
        org.bouncycastle.asn1.ASN1Sequence aSN1Sequence = this.c;
        if (aSN1Sequence == null) {
            return null;
        }
        int size = aSN1Sequence.size();
        org.bouncycastle.asn1.tsp.PartialHashtree[] partialHashtreeArr = new org.bouncycastle.asn1.tsp.PartialHashtree[size];
        for (int i = 0; i != size; i++) {
            partialHashtreeArr[i] = org.bouncycastle.asn1.tsp.PartialHashtree.o(this.c.B(i));
        }
        return partialHashtreeArr;
    }
}
