package org.bouncycastle.asn1.x509;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class DigestInfo extends org.bouncycastle.asn1.ASN1Object {
    private byte[] a;
    private org.bouncycastle.asn1.x509.AlgorithmIdentifier b;

    public DigestInfo(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        java.util.Enumeration enumerationC = aSN1Sequence.C();
        this.b = org.bouncycastle.asn1.x509.AlgorithmIdentifier.o(enumerationC.nextElement());
        this.a = org.bouncycastle.asn1.ASN1OctetString.y(enumerationC.nextElement()).A();
    }

    public static org.bouncycastle.asn1.x509.DigestInfo p(java.lang.Object obj) {
        if (obj instanceof org.bouncycastle.asn1.x509.DigestInfo) {
            return (org.bouncycastle.asn1.x509.DigestInfo) obj;
        }
        if (obj != null) {
            return new org.bouncycastle.asn1.x509.DigestInfo(org.bouncycastle.asn1.ASN1Sequence.z(obj));
        }
        return null;
    }

    @Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
    public org.bouncycastle.asn1.ASN1Primitive j() {
        return new org.bouncycastle.asn1.DERSequence(this.b, new org.bouncycastle.asn1.DEROctetString(this.a));
    }

    public org.bouncycastle.asn1.x509.AlgorithmIdentifier n() {
        return this.b;
    }

    public byte[] o() {
        return org.bouncycastle.util.Arrays.j(this.a);
    }

    public DigestInfo(org.bouncycastle.asn1.x509.AlgorithmIdentifier algorithmIdentifier, byte[] bArr) {
        this.a = org.bouncycastle.util.Arrays.j(bArr);
        this.b = algorithmIdentifier;
    }
}
