using System; using System.IO; using System.Runtime.InteropServices; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cms { // Token: 0x0200174C RID: 5964 [Token(Token = "0x200174C")] [StructLayout(3)] public class CmsAuthenticatedDataParser : CmsContentInfoParser { // Token: 0x0600A123 RID: 41251 RVA: 0x002578F8 File Offset: 0x00255AF8 [Token(Token = "0x600A123")] [Address(RVA = "0x1C72A00", Offset = "0x1C71400", VA = "0x181C72A00")] public CmsAuthenticatedDataParser(byte[] envelopedData) { int num; MemoryStream memoryStream = new MemoryStream(envelopedData, num != 0); num = 0; } // Token: 0x0600A124 RID: 41252 RVA: 0x00257910 File Offset: 0x00255B10 [Token(Token = "0x600A124")] [Address(RVA = "0x1C727C0", Offset = "0x1C711C0", VA = "0x181C727C0")] public CmsAuthenticatedDataParser(Stream envelopedData) { IAsn1Convertible content; for (;;) { base..ctor(envelopedData); ContentInfoParser contentInfo = this.contentInfo; this.authAttrNotRead = true; if (contentInfo.GetContent(16) == 0) { } AuthenticatedDataParser authenticatedDataParser; if (authenticatedDataParser != 0) { this.authData = authenticatedDataParser; Asn1SetParser recipientInfos = authenticatedDataParser.GetRecipientInfos(); AlgorithmIdentifier macAlgorithm = this.authData.GetMacAlgorithm(); AuthenticatedDataParser authenticatedDataParser2 = this.authData; this.macAlg = macAlgorithm; content = authenticatedDataParser2.GetEnapsulatedContentInfo().GetContent(4); if (content != 0 && content != 0) { break; } } } CmsProcessableInputStream cmsProcessableInputStream; cmsProcessableInputStream.input = content; AlgorithmIdentifier algorithmIdentifier = this.macAlg; CmsEnvelopedHelper.CmsAuthenticatedSecureReadable cmsAuthenticatedSecureReadable; cmsAuthenticatedSecureReadable.algorithm = algorithmIdentifier; cmsAuthenticatedSecureReadable.readable = cmsProcessableInputStream; Asn1Set asn1Set; RecipientInformationStore recipientInformationStore = CmsEnvelopedHelper.BuildRecipientInformationStore(asn1Set, cmsAuthenticatedSecureReadable); this._recipientInfoStore = recipientInformationStore; } // Token: 0x17001949 RID: 6473 // (get) Token: 0x0600A125 RID: 41253 RVA: 0x002579C0 File Offset: 0x00255BC0 [Token(Token = "0x17001949")] public AlgorithmIdentifier MacAlgorithmID { [Token(Token = "0x600A125")] [Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")] get { return this.macAlg; } } // Token: 0x1700194A RID: 6474 // (get) Token: 0x0600A126 RID: 41254 RVA: 0x002579D4 File Offset: 0x00255BD4 [Token(Token = "0x1700194A")] public string MacAlgOid { [Token(Token = "0x600A126")] [Address(RVA = "0x1C72A70", Offset = "0x1C71470", VA = "0x181C72A70")] get { Asn1Object asn1Object = this.macAlg.ToAsn1Object(); throw new NullReferenceException(); } } // Token: 0x1700194B RID: 6475 // (get) Token: 0x0600A127 RID: 41255 RVA: 0x002579F4 File Offset: 0x00255BF4 [Token(Token = "0x1700194B")] public Asn1Object MacAlgParams { [Token(Token = "0x600A127")] [Address(RVA = "0x1C72AB0", Offset = "0x1C714B0", VA = "0x181C72AB0")] get { DerObjectIdentifier objectID = this.macAlg.ObjectID; if (objectID == 0) { } return objectID.ToAsn1Object(); } } // Token: 0x0600A128 RID: 41256 RVA: 0x00257A20 File Offset: 0x00255C20 [Token(Token = "0x600A128")] [Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")] public RecipientInformationStore GetRecipientInfos() { return this._recipientInfoStore; } // Token: 0x0600A129 RID: 41257 RVA: 0x00257A34 File Offset: 0x00255C34 [Token(Token = "0x600A129")] [Address(RVA = "0x1C72450", Offset = "0x1C70E50", VA = "0x181C72450")] public byte[] GetMac() { byte[] array = this.mac; if (array == 0) { BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable attributeTable = this.GetAuthAttrs(); Stream octetStream = this.authData.GetMac().GetOctetStream(); this.mac = octetStream; } return Arrays.Clone(array); } // Token: 0x0600A12A RID: 41258 RVA: 0x00257A78 File Offset: 0x00255C78 [Token(Token = "0x600A12A")] [Address(RVA = "0x1C72190", Offset = "0x1C70B90", VA = "0x181C72190")] public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable GetAuthAttrs() { while (this.authAttrs == (ulong)0L && this.authAttrNotRead) { Asn1SetParser asn1SetParser = this.authData.GetAuthAttrs(); this.authAttrNotRead = false; if (asn1SetParser != 0) { int num = 0; int num2 = 0; if (num2 < num) { num2 += num2; num2++; } Asn1EncodableVector asn1EncodableVector; if (asn1EncodableVector != 0) { if (asn1EncodableVector == 0) { continue; } Asn1Encodable[] array = new Asn1Encodable[1]; num2 += num2; num2++; if (num2 != 0) { } array[0] = num2; asn1EncodableVector.Add(array); array += array; array += array; } BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable attributeTable = new BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable(new DerSet(asn1EncodableVector)); this.authAttrs = attributeTable; break; } break; } return this.authAttrs; } // Token: 0x0600A12B RID: 41259 RVA: 0x00257B28 File Offset: 0x00255D28 [Token(Token = "0x600A12B")] [Address(RVA = "0x1C72500", Offset = "0x1C70F00", VA = "0x181C72500")] public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable GetUnauthAttrs() { while (this.unauthAttrs == (ulong)0L && this.unauthAttrNotRead) { Asn1SetParser asn1SetParser = this.authData.GetUnauthAttrs(); this.unauthAttrNotRead = false; if (asn1SetParser != 0) { int num = 0; int num2 = 0; if (num2 < num) { num2 += num2; num2++; } Asn1EncodableVector asn1EncodableVector; if (asn1EncodableVector != 0) { if (asn1EncodableVector == 0) { continue; } Asn1Encodable[] array = new Asn1Encodable[1]; num2 += num2; num2++; if (num2 != 0) { } array[0] = num2; asn1EncodableVector.Add(array); array += array; array += array; } BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable attributeTable = new BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable(new DerSet(asn1EncodableVector)); this.unauthAttrs = attributeTable; break; } break; } return this.unauthAttrs; } // Token: 0x04006A1A RID: 27162 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x4006A1A")] internal RecipientInformationStore _recipientInfoStore; // Token: 0x04006A1B RID: 27163 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x4006A1B")] internal AuthenticatedDataParser authData; // Token: 0x04006A1C RID: 27164 [global::Cpp2IlInjected.FieldOffset(Offset = "0x30")] [Token(Token = "0x4006A1C")] private AlgorithmIdentifier macAlg; // Token: 0x04006A1D RID: 27165 [global::Cpp2IlInjected.FieldOffset(Offset = "0x38")] [Token(Token = "0x4006A1D")] private byte[] mac; // Token: 0x04006A1E RID: 27166 [global::Cpp2IlInjected.FieldOffset(Offset = "0x40")] [Token(Token = "0x4006A1E")] private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable authAttrs; // Token: 0x04006A1F RID: 27167 [global::Cpp2IlInjected.FieldOffset(Offset = "0x48")] [Token(Token = "0x4006A1F")] private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable unauthAttrs; // Token: 0x04006A20 RID: 27168 [global::Cpp2IlInjected.FieldOffset(Offset = "0x50")] [Token(Token = "0x4006A20")] private bool authAttrNotRead; // Token: 0x04006A21 RID: 27169 [global::Cpp2IlInjected.FieldOffset(Offset = "0x51")] [Token(Token = "0x4006A21")] private bool unauthAttrNotRead; } }