65 lines
2.0 KiB
Java
65 lines
2.0 KiB
Java
package org.bouncycastle.asn1.pkcs;
|
|
|
|
import org.bouncycastle.asn1.ASN1EncodableVector;
|
|
import org.bouncycastle.asn1.ASN1Object;
|
|
import org.bouncycastle.asn1.ASN1Primitive;
|
|
import org.bouncycastle.asn1.ASN1Sequence;
|
|
import org.bouncycastle.asn1.BERSequence;
|
|
import org.bouncycastle.asn1.DLSequence;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class AuthenticatedSafe extends ASN1Object {
|
|
private ContentInfo[] info;
|
|
private boolean isBer;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
|
int i = 0;
|
|
while (true) {
|
|
ContentInfo[] contentInfoArr = this.info;
|
|
if (i == contentInfoArr.length) {
|
|
break;
|
|
}
|
|
aSN1EncodableVector.add(contentInfoArr[i]);
|
|
i++;
|
|
}
|
|
return this.isBer ? new BERSequence(aSN1EncodableVector) : new DLSequence(aSN1EncodableVector);
|
|
}
|
|
|
|
public ContentInfo[] getContentInfo() {
|
|
return this.info;
|
|
}
|
|
|
|
public static AuthenticatedSafe getInstance(Object obj) {
|
|
if (obj instanceof AuthenticatedSafe) {
|
|
return (AuthenticatedSafe) obj;
|
|
}
|
|
if (obj != null) {
|
|
return new AuthenticatedSafe(ASN1Sequence.getInstance(obj));
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public AuthenticatedSafe(ContentInfo[] contentInfoArr) {
|
|
this.isBer = true;
|
|
this.info = contentInfoArr;
|
|
}
|
|
|
|
private AuthenticatedSafe(ASN1Sequence aSN1Sequence) {
|
|
this.isBer = true;
|
|
this.info = new ContentInfo[aSN1Sequence.size()];
|
|
int i = 0;
|
|
while (true) {
|
|
ContentInfo[] contentInfoArr = this.info;
|
|
if (i == contentInfoArr.length) {
|
|
this.isBer = aSN1Sequence instanceof BERSequence;
|
|
return;
|
|
} else {
|
|
contentInfoArr[i] = ContentInfo.getInstance(aSN1Sequence.getObjectAt(i));
|
|
i++;
|
|
}
|
|
}
|
|
}
|
|
}
|