what-the-bank/sources/org/bouncycastle/asn1/crmf/Controls.java

53 lines
1.8 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package org.bouncycastle.asn1.crmf;
import org.bouncycastle.asn1.ASN1EncodableVector;
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 Controls extends ASN1Object {
private ASN1Sequence content;
public AttributeTypeAndValue[] toAttributeTypeAndValueArray() {
int size = this.content.size();
AttributeTypeAndValue[] attributeTypeAndValueArr = new AttributeTypeAndValue[size];
for (int i = 0; i != size; i++) {
attributeTypeAndValueArr[i] = AttributeTypeAndValue.getInstance(this.content.getObjectAt(i));
}
return attributeTypeAndValueArr;
}
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
public ASN1Primitive toASN1Primitive() {
return this.content;
}
public static Controls getInstance(Object obj) {
if (obj instanceof Controls) {
return (Controls) obj;
}
if (obj != null) {
return new Controls(ASN1Sequence.getInstance(obj));
}
return null;
}
public Controls(AttributeTypeAndValue[] attributeTypeAndValueArr) {
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
for (AttributeTypeAndValue attributeTypeAndValue : attributeTypeAndValueArr) {
aSN1EncodableVector.add(attributeTypeAndValue);
}
this.content = new DERSequence(aSN1EncodableVector);
}
public Controls(AttributeTypeAndValue attributeTypeAndValue) {
this.content = new DERSequence(attributeTypeAndValue);
}
private Controls(ASN1Sequence aSN1Sequence) {
this.content = aSN1Sequence;
}
}