package org.bouncycastle.asn1.pkcs;

/* JADX INFO: loaded from: E:\ios\vf_dex\classes4.dex */
public class RSAPrivateKey extends org.bouncycastle.asn1.ASN1Object {
    private java.math.BigInteger a;
    private java.math.BigInteger b;
    private java.math.BigInteger c;
    private java.math.BigInteger d;
    private java.math.BigInteger e;
    private java.math.BigInteger f;
    private java.math.BigInteger g;
    private java.math.BigInteger h;
    private java.math.BigInteger i;
    private org.bouncycastle.asn1.ASN1Sequence j;

    public RSAPrivateKey(java.math.BigInteger bigInteger, java.math.BigInteger bigInteger2, java.math.BigInteger bigInteger3, java.math.BigInteger bigInteger4, java.math.BigInteger bigInteger5, java.math.BigInteger bigInteger6, java.math.BigInteger bigInteger7, java.math.BigInteger bigInteger8) {
        this.j = null;
        this.a = java.math.BigInteger.valueOf(0L);
        this.b = bigInteger;
        this.c = bigInteger2;
        this.d = bigInteger3;
        this.e = bigInteger4;
        this.f = bigInteger5;
        this.g = bigInteger6;
        this.h = bigInteger7;
        this.i = bigInteger8;
    }

    public static org.bouncycastle.asn1.pkcs.RSAPrivateKey q(java.lang.Object obj) {
        if (obj instanceof org.bouncycastle.asn1.pkcs.RSAPrivateKey) {
            return (org.bouncycastle.asn1.pkcs.RSAPrivateKey) obj;
        }
        if (obj != null) {
            return new org.bouncycastle.asn1.pkcs.RSAPrivateKey(org.bouncycastle.asn1.ASN1Sequence.z(obj));
        }
        return null;
    }

    @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(10);
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(this.a));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(r()));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(v()));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(u()));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(s()));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(t()));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(o()));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(p()));
        aSN1EncodableVector.a(new org.bouncycastle.asn1.ASN1Integer(n()));
        org.bouncycastle.asn1.ASN1Sequence aSN1Sequence = this.j;
        if (aSN1Sequence != null) {
            aSN1EncodableVector.a(aSN1Sequence);
        }
        return new org.bouncycastle.asn1.DERSequence(aSN1EncodableVector);
    }

    public java.math.BigInteger n() {
        return this.i;
    }

    public java.math.BigInteger o() {
        return this.g;
    }

    public java.math.BigInteger p() {
        return this.h;
    }

    public java.math.BigInteger r() {
        return this.b;
    }

    public java.math.BigInteger s() {
        return this.e;
    }

    public java.math.BigInteger t() {
        return this.f;
    }

    public java.math.BigInteger u() {
        return this.d;
    }

    public java.math.BigInteger v() {
        return this.c;
    }

    private RSAPrivateKey(org.bouncycastle.asn1.ASN1Sequence aSN1Sequence) {
        this.j = null;
        java.util.Enumeration enumerationC = aSN1Sequence.C();
        org.bouncycastle.asn1.ASN1Integer aSN1Integer = (org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement();
        int iG = aSN1Integer.G();
        if (iG < 0 || iG > 1) {
            throw new java.lang.IllegalArgumentException("wrong version for RSA private key");
        }
        this.a = aSN1Integer.B();
        this.b = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        this.c = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        this.d = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        this.e = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        this.f = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        this.g = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        this.h = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        this.i = ((org.bouncycastle.asn1.ASN1Integer) enumerationC.nextElement()).B();
        if (enumerationC.hasMoreElements()) {
            this.j = (org.bouncycastle.asn1.ASN1Sequence) enumerationC.nextElement();
        }
    }
}
