85 lines
2.9 KiB
Java
85 lines
2.9 KiB
Java
|
package org.bouncycastle.asn1.ua;
|
||
|
|
||
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
||
|
import org.bouncycastle.asn1.ASN1Integer;
|
||
|
import org.bouncycastle.asn1.ASN1Object;
|
||
|
import org.bouncycastle.asn1.ASN1Primitive;
|
||
|
import org.bouncycastle.asn1.ASN1Sequence;
|
||
|
import org.bouncycastle.asn1.DERSequence;
|
||
|
|
||
|
/* loaded from: classes6.dex */
|
||
|
public class DSTU4145BinaryField extends ASN1Object {
|
||
|
private int j;
|
||
|
private int k;
|
||
|
private int l;
|
||
|
private int m;
|
||
|
|
||
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
||
|
public ASN1Primitive toASN1Primitive() {
|
||
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
||
|
aSN1EncodableVector.add(new ASN1Integer(this.m));
|
||
|
if (this.j == 0) {
|
||
|
aSN1EncodableVector.add(new ASN1Integer(this.k));
|
||
|
} else {
|
||
|
ASN1EncodableVector aSN1EncodableVector2 = new ASN1EncodableVector();
|
||
|
aSN1EncodableVector2.add(new ASN1Integer(this.k));
|
||
|
aSN1EncodableVector2.add(new ASN1Integer(this.j));
|
||
|
aSN1EncodableVector2.add(new ASN1Integer(this.l));
|
||
|
aSN1EncodableVector.add(new DERSequence(aSN1EncodableVector2));
|
||
|
}
|
||
|
return new DERSequence(aSN1EncodableVector);
|
||
|
}
|
||
|
|
||
|
public int getM() {
|
||
|
return this.m;
|
||
|
}
|
||
|
|
||
|
public int getK3() {
|
||
|
return this.l;
|
||
|
}
|
||
|
|
||
|
public int getK2() {
|
||
|
return this.j;
|
||
|
}
|
||
|
|
||
|
public int getK1() {
|
||
|
return this.k;
|
||
|
}
|
||
|
|
||
|
public static DSTU4145BinaryField getInstance(Object obj) {
|
||
|
if (obj instanceof DSTU4145BinaryField) {
|
||
|
return (DSTU4145BinaryField) obj;
|
||
|
}
|
||
|
if (obj != null) {
|
||
|
return new DSTU4145BinaryField(ASN1Sequence.getInstance(obj));
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
|
||
|
private DSTU4145BinaryField(ASN1Sequence aSN1Sequence) {
|
||
|
this.m = ASN1Integer.getInstance(aSN1Sequence.getObjectAt(0)).getPositiveValue().intValue();
|
||
|
if (aSN1Sequence.getObjectAt(1) instanceof ASN1Integer) {
|
||
|
this.k = ((ASN1Integer) aSN1Sequence.getObjectAt(1)).getPositiveValue().intValue();
|
||
|
} else {
|
||
|
if (!(aSN1Sequence.getObjectAt(1) instanceof ASN1Sequence)) {
|
||
|
throw new IllegalArgumentException("object parse error");
|
||
|
}
|
||
|
ASN1Sequence aSN1Sequence2 = ASN1Sequence.getInstance(aSN1Sequence.getObjectAt(1));
|
||
|
this.k = ASN1Integer.getInstance(aSN1Sequence2.getObjectAt(0)).getPositiveValue().intValue();
|
||
|
this.j = ASN1Integer.getInstance(aSN1Sequence2.getObjectAt(1)).getPositiveValue().intValue();
|
||
|
this.l = ASN1Integer.getInstance(aSN1Sequence2.getObjectAt(2)).getPositiveValue().intValue();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public DSTU4145BinaryField(int i, int i2, int i3, int i4) {
|
||
|
this.m = i;
|
||
|
this.k = i2;
|
||
|
this.j = i3;
|
||
|
this.l = i4;
|
||
|
}
|
||
|
|
||
|
public DSTU4145BinaryField(int i, int i2) {
|
||
|
this(i, i2, 0, 0);
|
||
|
}
|
||
|
}
|