using System; using System.IO; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cms { // Token: 0x02001D35 RID: 7477 [Token(Token = "0x2001D35")] public class CmsEnvelopedDataParser : CmsContentInfoParser { // Token: 0x0600BD38 RID: 48440 RVA: 0x002B0BD4 File Offset: 0x002AEDD4 [Token(Token = "0x600BD38")] [Address(RVA = "0x1663570", Offset = "0x1662370", VA = "0x181663570")] public CmsEnvelopedDataParser(byte[] envelopedData) { int num; MemoryStream memoryStream = new MemoryStream(envelopedData, num != 0); num = 0; } // Token: 0x0600BD39 RID: 48441 RVA: 0x002B0BEC File Offset: 0x002AEDEC [Token(Token = "0x600BD39")] [Address(RVA = "0x16635E0", Offset = "0x16623E0", VA = "0x1816635E0")] public CmsEnvelopedDataParser(Stream envelopedData) { IAsn1Convertible encryptedContent; for (;;) { base..ctor(envelopedData); ContentInfoParser contentInfo = this.contentInfo; this._attrNotRead = true; if (contentInfo.GetContent(16) == 0) { } EnvelopedDataParser envelopedDataParser; if (envelopedDataParser != 0) { this.envelopedData = envelopedDataParser; Asn1SetParser recipientInfos = envelopedDataParser.GetRecipientInfos(); EncryptedContentInfoParser encryptedContentInfo = this.envelopedData.GetEncryptedContentInfo(); AlgorithmIdentifier contentEncryptionAlgorithm = encryptedContentInfo._contentEncryptionAlgorithm; this._encAlg = contentEncryptionAlgorithm; encryptedContent = encryptedContentInfo.GetEncryptedContent(4); if (encryptedContent != 0 && encryptedContent != 0) { break; } } } CmsProcessableInputStream cmsProcessableInputStream; cmsProcessableInputStream.input = encryptedContent; AlgorithmIdentifier encAlg = this._encAlg; CmsEnvelopedHelper.CmsEnvelopedSecureReadable cmsEnvelopedSecureReadable; cmsEnvelopedSecureReadable.algorithm = encAlg; cmsEnvelopedSecureReadable.readable = cmsProcessableInputStream; Asn1Set asn1Set; RecipientInformationStore recipientInformationStore = CmsEnvelopedHelper.BuildRecipientInformationStore(asn1Set, cmsEnvelopedSecureReadable); this.recipientInfoStore = recipientInformationStore; } // Token: 0x17001D51 RID: 7505 // (get) Token: 0x0600BD3A RID: 48442 RVA: 0x002B0C98 File Offset: 0x002AEE98 [Token(Token = "0x17001D51")] public AlgorithmIdentifier EncryptionAlgorithmID { [Token(Token = "0x600BD3A")] [Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")] get { return this._encAlg; } } // Token: 0x17001D52 RID: 7506 // (get) Token: 0x0600BD3B RID: 48443 RVA: 0x002B0CAC File Offset: 0x002AEEAC [Token(Token = "0x17001D52")] public string EncryptionAlgOid { [Token(Token = "0x600BD3B")] [Address(RVA = "0x1660400", Offset = "0x165F200", VA = "0x181660400")] get { Asn1Object asn1Object = this._encAlg.ToAsn1Object(); throw new NullReferenceException(); } } // Token: 0x17001D53 RID: 7507 // (get) Token: 0x0600BD3C RID: 48444 RVA: 0x002B0CCC File Offset: 0x002AEECC [Token(Token = "0x17001D53")] public Asn1Object EncryptionAlgParams { [Token(Token = "0x600BD3C")] [Address(RVA = "0x1660440", Offset = "0x165F240", VA = "0x181660440")] get { DerObjectIdentifier objectID = this._encAlg.ObjectID; if (objectID == 0) { } return objectID.ToAsn1Object(); } } // Token: 0x0600BD3D RID: 48445 RVA: 0x002B0CF8 File Offset: 0x002AEEF8 [Token(Token = "0x600BD3D")] [Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")] public RecipientInformationStore GetRecipientInfos() { return this.recipientInfoStore; } // Token: 0x0600BD3E RID: 48446 RVA: 0x002B0D0C File Offset: 0x002AEF0C [Token(Token = "0x600BD3E")] [Address(RVA = "0x16632B0", Offset = "0x16620B0", VA = "0x1816632B0")] public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable GetUnprotectedAttributes() { while (this._unprotectedAttributes == (ulong)0L && this._attrNotRead) { Asn1SetParser unprotectedAttrs = this.envelopedData.GetUnprotectedAttrs(); this._attrNotRead = false; if (unprotectedAttrs != 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._unprotectedAttributes = attributeTable; break; } break; } return this._unprotectedAttributes; } // Token: 0x0400787A RID: 30842 [FieldOffset(Offset = "0x20")] [Token(Token = "0x400787A")] internal RecipientInformationStore recipientInfoStore; // Token: 0x0400787B RID: 30843 [FieldOffset(Offset = "0x28")] [Token(Token = "0x400787B")] internal EnvelopedDataParser envelopedData; // Token: 0x0400787C RID: 30844 [FieldOffset(Offset = "0x30")] [Token(Token = "0x400787C")] private AlgorithmIdentifier _encAlg; // Token: 0x0400787D RID: 30845 [FieldOffset(Offset = "0x38")] [Token(Token = "0x400787D")] private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable _unprotectedAttributes; // Token: 0x0400787E RID: 30846 [FieldOffset(Offset = "0x40")] [Token(Token = "0x400787E")] private bool _attrNotRead; } }