45 lines
1.3 KiB
Java
45 lines
1.3 KiB
Java
package org.bouncycastle.asn1.cms;
|
|
|
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
|
import org.bouncycastle.asn1.ASN1Object;
|
|
import org.bouncycastle.asn1.ASN1Primitive;
|
|
import org.bouncycastle.asn1.ASN1Set;
|
|
import org.bouncycastle.asn1.DLSet;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class Attributes extends ASN1Object {
|
|
private ASN1Set attributes;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
return this.attributes;
|
|
}
|
|
|
|
public Attribute[] getAttributes() {
|
|
int size = this.attributes.size();
|
|
Attribute[] attributeArr = new Attribute[size];
|
|
for (int i = 0; i != size; i++) {
|
|
attributeArr[i] = Attribute.getInstance(this.attributes.getObjectAt(i));
|
|
}
|
|
return attributeArr;
|
|
}
|
|
|
|
public static Attributes getInstance(Object obj) {
|
|
if (obj instanceof Attributes) {
|
|
return (Attributes) obj;
|
|
}
|
|
if (obj != null) {
|
|
return new Attributes(ASN1Set.getInstance(obj));
|
|
}
|
|
return null;
|
|
}
|
|
|
|
private Attributes(ASN1Set aSN1Set) {
|
|
this.attributes = aSN1Set;
|
|
}
|
|
|
|
public Attributes(ASN1EncodableVector aSN1EncodableVector) {
|
|
this.attributes = new DLSet(aSN1EncodableVector);
|
|
}
|
|
}
|