65 lines
2.3 KiB
Java
65 lines
2.3 KiB
Java
package org.bouncycastle.asn1.cms;
|
|
|
|
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.ASN1TaggedObject;
|
|
import org.bouncycastle.asn1.BERSequence;
|
|
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
|
|
|
|
/* loaded from: classes6.dex */
|
|
public class CompressedData extends ASN1Object {
|
|
private AlgorithmIdentifier compressionAlgorithm;
|
|
private ContentInfo encapContentInfo;
|
|
private ASN1Integer version;
|
|
|
|
@Override // org.bouncycastle.asn1.ASN1Object, org.bouncycastle.asn1.ASN1Encodable
|
|
public ASN1Primitive toASN1Primitive() {
|
|
ASN1EncodableVector aSN1EncodableVector = new ASN1EncodableVector();
|
|
aSN1EncodableVector.add(this.version);
|
|
aSN1EncodableVector.add(this.compressionAlgorithm);
|
|
aSN1EncodableVector.add(this.encapContentInfo);
|
|
return new BERSequence(aSN1EncodableVector);
|
|
}
|
|
|
|
public ASN1Integer getVersion() {
|
|
return this.version;
|
|
}
|
|
|
|
public ContentInfo getEncapContentInfo() {
|
|
return this.encapContentInfo;
|
|
}
|
|
|
|
public AlgorithmIdentifier getCompressionAlgorithmIdentifier() {
|
|
return this.compressionAlgorithm;
|
|
}
|
|
|
|
public static CompressedData getInstance(ASN1TaggedObject aSN1TaggedObject, boolean z) {
|
|
return getInstance(ASN1Sequence.getInstance(aSN1TaggedObject, z));
|
|
}
|
|
|
|
public static CompressedData getInstance(Object obj) {
|
|
if (obj instanceof CompressedData) {
|
|
return (CompressedData) obj;
|
|
}
|
|
if (obj != null) {
|
|
return new CompressedData(ASN1Sequence.getInstance(obj));
|
|
}
|
|
return null;
|
|
}
|
|
|
|
public CompressedData(AlgorithmIdentifier algorithmIdentifier, ContentInfo contentInfo) {
|
|
this.version = new ASN1Integer(0L);
|
|
this.compressionAlgorithm = algorithmIdentifier;
|
|
this.encapContentInfo = contentInfo;
|
|
}
|
|
|
|
private CompressedData(ASN1Sequence aSN1Sequence) {
|
|
this.version = (ASN1Integer) aSN1Sequence.getObjectAt(0);
|
|
this.compressionAlgorithm = AlgorithmIdentifier.getInstance(aSN1Sequence.getObjectAt(1));
|
|
this.encapContentInfo = ContentInfo.getInstance(aSN1Sequence.getObjectAt(2));
|
|
}
|
|
}
|