Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Asn1/Cms/EnvelopedData.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

315 lines
8.5 KiB
C#

using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
{
// Token: 0x02002008 RID: 8200
[Token(Token = "0x2002008")]
public class EnvelopedData : Asn1Encodable
{
// Token: 0x0600CD62 RID: 52578 RVA: 0x002EB404 File Offset: 0x002E9604
[Token(Token = "0x600CD62")]
[Address(RVA = "0x2FE3090", Offset = "0x2FE2090", VA = "0x182FE3090")]
public EnvelopedData(OriginatorInfo originatorInfo, Asn1Set recipientInfos, EncryptedContentInfo encryptedContentInfo, Asn1Set unprotectedAttrs)
{
int num;
DerInteger derInteger = new DerInteger(num);
this.version = derInteger;
this.unprotectedAttrs = 0;
this.originatorInfo = originatorInfo;
this.recipientInfos = recipientInfos;
this.encryptedContentInfo = encryptedContentInfo;
}
// Token: 0x0600CD63 RID: 52579 RVA: 0x002EB444 File Offset: 0x002E9644
[Token(Token = "0x600CD63")]
[Address(RVA = "0x2FE33D0", Offset = "0x2FE23D0", VA = "0x182FE33D0")]
public EnvelopedData(OriginatorInfo originatorInfo, Asn1Set recipientInfos, EncryptedContentInfo encryptedContentInfo, Attributes unprotectedAttrs)
{
Asn1Set asn1Set;
DerInteger derInteger = new DerInteger(EnvelopedData.CalculateVersion(originatorInfo, recipientInfos, asn1Set));
this.version = derInteger;
this.originatorInfo = originatorInfo;
this.recipientInfos = recipientInfos;
this.encryptedContentInfo = encryptedContentInfo;
Asn1Set asn1Set2;
this.unprotectedAttrs = asn1Set2;
}
// Token: 0x0600CD64 RID: 52580 RVA: 0x002EB488 File Offset: 0x002E9688
[Token(Token = "0x600CD64")]
[Address(RVA = "0x2FE3150", Offset = "0x2FE2150", VA = "0x182FE3150")]
[Obsolete]
public EnvelopedData(Asn1Sequence seq)
{
for (;;)
{
base..ctor();
Asn1SequenceParser parser = seq.Parser;
if (parser == 0)
{
}
if (parser != 0)
{
this.version = parser;
Asn1SequenceParser parser2 = seq.Parser;
if (parser2 != 0 && parser2 != 0)
{
if (parser2 == 0)
{
continue;
}
Asn1Sequence asn1Sequence;
OriginatorInfo instance = OriginatorInfo.GetInstance(asn1Sequence);
this.originatorInfo = instance;
Asn1SequenceParser parser3 = seq.Parser;
}
Asn1Set asn1Set;
this.recipientInfos = asn1Set;
Asn1SequenceParser parser4 = seq.Parser;
EncryptedContentInfo encryptedContentInfo;
this.encryptedContentInfo = encryptedContentInfo;
Asn1Encodable asn1Encodable;
if (asn1Encodable <= (uint)3)
{
return;
}
Asn1SequenceParser parser5 = seq.Parser;
if (parser5 == 0 || parser5 != 0)
{
break;
}
}
}
Asn1Set asn1Set2;
this.unprotectedAttrs = asn1Set2;
}
// Token: 0x0600CD65 RID: 52581 RVA: 0x002EB528 File Offset: 0x002E9728
[Token(Token = "0x600CD65")]
[Address(RVA = "0x2FE2B50", Offset = "0x2FE1B50", VA = "0x182FE2B50")]
public static EnvelopedData GetInstance(Asn1TaggedObject obj, bool explicitly)
{
Asn1Sequence instance;
Asn1Sequence instance2;
for (;;)
{
instance = Asn1Sequence.GetInstance(obj, explicitly);
if (instance == 0)
{
return;
}
if (instance == 0)
{
break;
}
if (instance2 != 0)
{
return;
}
}
instance2 = Asn1Sequence.GetInstance(instance);
return new EnvelopedData(instance2);
}
// Token: 0x0600CD66 RID: 52582 RVA: 0x002EB564 File Offset: 0x002E9764
[Token(Token = "0x600CD66")]
[Address(RVA = "0x2FE2C50", Offset = "0x2FE1C50", VA = "0x182FE2C50")]
public static EnvelopedData GetInstance(object obj)
{
while (obj != 0)
{
Asn1Sequence instance;
if (obj == 0)
{
instance = Asn1Sequence.GetInstance(obj);
return new EnvelopedData(instance);
}
if (instance != 0)
{
return;
}
}
}
// Token: 0x1700205A RID: 8282
// (get) Token: 0x0600CD67 RID: 52583 RVA: 0x002EB598 File Offset: 0x002E9798
[Token(Token = "0x1700205A")]
public DerInteger Version
{
[Token(Token = "0x600CD67")]
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
get
{
return this.version;
}
}
// Token: 0x1700205B RID: 8283
// (get) Token: 0x0600CD68 RID: 52584 RVA: 0x002EB5AC File Offset: 0x002E97AC
[Token(Token = "0x1700205B")]
public OriginatorInfo OriginatorInfo
{
[Token(Token = "0x600CD68")]
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
get
{
return this.originatorInfo;
}
}
// Token: 0x1700205C RID: 8284
// (get) Token: 0x0600CD69 RID: 52585 RVA: 0x002EB5C0 File Offset: 0x002E97C0
[Token(Token = "0x1700205C")]
public Asn1Set RecipientInfos
{
[Token(Token = "0x600CD69")]
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
get
{
return this.recipientInfos;
}
}
// Token: 0x1700205D RID: 8285
// (get) Token: 0x0600CD6A RID: 52586 RVA: 0x002EB5D4 File Offset: 0x002E97D4
[Token(Token = "0x1700205D")]
public EncryptedContentInfo EncryptedContentInfo
{
[Token(Token = "0x600CD6A")]
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
get
{
return this.encryptedContentInfo;
}
}
// Token: 0x1700205E RID: 8286
// (get) Token: 0x0600CD6B RID: 52587 RVA: 0x002EB5E8 File Offset: 0x002E97E8
[Token(Token = "0x1700205E")]
public Asn1Set UnprotectedAttrs
{
[Token(Token = "0x600CD6B")]
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
get
{
return this.unprotectedAttrs;
}
}
// Token: 0x0600CD6C RID: 52588 RVA: 0x002EB5FC File Offset: 0x002E97FC
[Token(Token = "0x600CD6C")]
[Address(RVA = "0x2FE2D50", Offset = "0x2FE1D50", VA = "0x182FE2D50", Slot = "5")]
public override Asn1Object ToAsn1Object()
{
Asn1Encodable[] array = new Asn1Encodable[1];
DerInteger derInteger = this.version;
if (derInteger != 0)
{
}
array[0] = derInteger;
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
if (this.originatorInfo != (ulong)0L)
{
Asn1Encodable[] array2 = new Asn1Encodable[1];
OriginatorInfo originatorInfo = this.originatorInfo;
int num;
int num2;
DerTaggedObject derTaggedObject = new DerTaggedObject(num != 0, num2, originatorInfo);
num2 = 0;
num = 0;
if (derTaggedObject != 0)
{
}
array2[0] = derTaggedObject;
asn1EncodableVector.Add(array2);
}
Asn1Encodable[] array3 = new Asn1Encodable[2];
Asn1Set asn1Set = this.recipientInfos;
if (asn1Set != 0)
{
}
array3[0] = asn1Set;
EncryptedContentInfo encryptedContentInfo = this.encryptedContentInfo;
if (encryptedContentInfo != 0)
{
}
array3[1] = encryptedContentInfo;
asn1EncodableVector.Add(array3);
if (this.unprotectedAttrs != (ulong)0L)
{
Asn1Encodable[] array4 = new Asn1Encodable[1];
Asn1Set asn1Set2 = this.unprotectedAttrs;
int num3;
DerTaggedObject derTaggedObject2 = new DerTaggedObject(num3 != 0, 1, asn1Set2);
num3 = 0;
if (derTaggedObject2 != 0)
{
}
array4[0] = derTaggedObject2;
asn1EncodableVector.Add(array4);
}
BerSequence berSequence = new BerSequence(asn1EncodableVector);
throw new NullReferenceException();
}
// Token: 0x0600CD6D RID: 52589 RVA: 0x002EB6F8 File Offset: 0x002E98F8
[Token(Token = "0x600CD6D")]
[Address(RVA = "0x2FE2970", Offset = "0x2FE1970", VA = "0x182FE2970")]
public static int CalculateVersion(OriginatorInfo originatorInfo, Asn1Set recipientInfos, Asn1Set unprotectedAttrs)
{
int num;
do
{
num = 0;
if (originatorInfo != 0 || unprotectedAttrs != 0)
{
return 2;
}
int intValue;
if (recipientInfos.GetEnumerator() != 0)
{
RecipientInfo recipientInfo;
intValue = recipientInfo.Version.Value.IntValue;
while (intValue == 0)
{
}
}
if (intValue != 0)
{
}
}
while (num != 0);
if (num != -1)
{
}
return 2;
}
// Token: 0x04008248 RID: 33352
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4008248")]
private DerInteger version;
// Token: 0x04008249 RID: 33353
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4008249")]
private OriginatorInfo originatorInfo;
// Token: 0x0400824A RID: 33354
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400824A")]
private Asn1Set recipientInfos;
// Token: 0x0400824B RID: 33355
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x400824B")]
private EncryptedContentInfo encryptedContentInfo;
// Token: 0x0400824C RID: 33356
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x400824C")]
private Asn1Set unprotectedAttrs;
}
}