package org.bouncycastle.cert.cmp;

import org.bouncycastle.asn1.ASN1Integer;
import org.bouncycastle.asn1.cmp.PKIBody;
import org.bouncycastle.asn1.cmp.POPODecKeyRespContent;

/* JADX INFO: loaded from: classes3.dex */
public class POPODecryptionKeyResponseContent {
    private final POPODecKeyRespContent respContent;

    POPODecryptionKeyResponseContent(POPODecKeyRespContent pOPODecKeyRespContent) {
        this.respContent = pOPODecKeyRespContent;
    }

    public static POPODecryptionKeyResponseContent fromPKIBody(PKIBody pKIBody) {
        if (pKIBody.getType() == 6) {
            return new POPODecryptionKeyResponseContent(POPODecKeyRespContent.getInstance(pKIBody.getContent()));
        }
        throw new IllegalArgumentException("content of PKIBody wrong type: " + pKIBody.getType());
    }

    public byte[][] getResponses() {
        ASN1Integer[] aSN1IntegerArray = this.respContent.toASN1IntegerArray();
        byte[][] bArr = new byte[aSN1IntegerArray.length][];
        for (int i = 0; i != aSN1IntegerArray.length; i++) {
            bArr[i] = aSN1IntegerArray[i].getValue().toByteArray();
        }
        return bArr;
    }

    public POPODecKeyRespContent toASN1Structure() {
        return this.respContent;
    }
}
