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 Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Cms { // Token: 0x02001756 RID: 5974 [Token(Token = "0x2001756")] [StructLayout(3)] public class CmsEnvelopedData { // Token: 0x0600A150 RID: 41296 RVA: 0x00258410 File Offset: 0x00256610 [Token(Token = "0x600A150")] [Address(RVA = "0x1C77070", Offset = "0x1C75A70", VA = "0x181C77070")] public CmsEnvelopedData(byte[] envelopedData) { ContentInfo contentInfo = CmsUtilities.ReadContentInfo(new Asn1InputStream(envelopedData)); } // Token: 0x0600A151 RID: 41297 RVA: 0x0025842C File Offset: 0x0025662C [Token(Token = "0x600A151")] [Address(RVA = "0x1C76EB0", Offset = "0x1C758B0", VA = "0x181C76EB0")] public CmsEnvelopedData(Stream envelopedData) { ContentInfo contentInfo = CmsUtilities.ReadContentInfo(new Asn1InputStream(envelopedData, int.MaxValue)); } // Token: 0x0600A152 RID: 41298 RVA: 0x0025844C File Offset: 0x0025664C [Token(Token = "0x600A152")] [Address(RVA = "0x1C76F30", Offset = "0x1C75930", VA = "0x181C76F30")] public CmsEnvelopedData(ContentInfo contentInfo) { this.contentInfo = contentInfo; EnvelopedData instance = EnvelopedData.GetInstance(contentInfo.content); Asn1Set recipientInfos = instance.recipientInfos; EncryptedContentInfo encryptedContentInfo = instance.encryptedContentInfo; AlgorithmIdentifier contentEncryptionAlgorithm = encryptedContentInfo.contentEncryptionAlgorithm; this.encAlg = contentEncryptionAlgorithm; Stream octetStream = encryptedContentInfo.encryptedContent.GetOctetStream(); CmsProcessableByteArray cmsProcessableByteArray; cmsProcessableByteArray.bytes = octetStream; AlgorithmIdentifier algorithmIdentifier = this.encAlg; CmsEnvelopedHelper.CmsEnvelopedSecureReadable cmsEnvelopedSecureReadable; cmsEnvelopedSecureReadable.readable = cmsProcessableByteArray; cmsEnvelopedSecureReadable.algorithm = algorithmIdentifier; RecipientInformationStore recipientInformationStore = CmsEnvelopedHelper.BuildRecipientInformationStore(recipientInfos, cmsEnvelopedSecureReadable); this.recipientInfoStore = recipientInformationStore; Asn1Set unprotectedAttrs = instance.unprotectedAttrs; this.unprotectedAttributes = unprotectedAttrs; } // Token: 0x1700194D RID: 6477 // (get) Token: 0x0600A153 RID: 41299 RVA: 0x002584E8 File Offset: 0x002566E8 [Token(Token = "0x1700194D")] public AlgorithmIdentifier EncryptionAlgorithmID { [Token(Token = "0x600A153")] [Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")] get { return this.encAlg; } } // Token: 0x1700194E RID: 6478 // (get) Token: 0x0600A154 RID: 41300 RVA: 0x002584FC File Offset: 0x002566FC [Token(Token = "0x1700194E")] public string EncryptionAlgOid { [Token(Token = "0x600A154")] [Address(RVA = "0x668A50", Offset = "0x667450", VA = "0x180668A50")] get { Asn1Object asn1Object = this.encAlg.ToAsn1Object(); throw new NullReferenceException(); } } // Token: 0x0600A155 RID: 41301 RVA: 0x0025851C File Offset: 0x0025671C [Token(Token = "0x600A155")] [Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")] public RecipientInformationStore GetRecipientInfos() { return this.recipientInfoStore; } // Token: 0x1700194F RID: 6479 // (get) Token: 0x0600A156 RID: 41302 RVA: 0x00258530 File Offset: 0x00256730 [Token(Token = "0x1700194F")] public ContentInfo ContentInfo { [Token(Token = "0x600A156")] [Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")] get { return this.contentInfo; } } // Token: 0x0600A157 RID: 41303 RVA: 0x00258544 File Offset: 0x00256744 [Token(Token = "0x600A157")] [Address(RVA = "0x1C76E40", Offset = "0x1C75840", VA = "0x181C76E40")] public BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable GetUnprotectedAttributes() { Asn1Set asn1Set = this.unprotectedAttributes; if (asn1Set != 0) { return new BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable(asn1Set); } } // Token: 0x0600A158 RID: 41304 RVA: 0x00258564 File Offset: 0x00256764 [Token(Token = "0x600A158")] [Address(RVA = "0x1C73790", Offset = "0x1C72190", VA = "0x181C73790")] public byte[] GetEncoded() { return this.contentInfo.GetEncoded(); } // Token: 0x04006A33 RID: 27187 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x4006A33")] internal RecipientInformationStore recipientInfoStore; // Token: 0x04006A34 RID: 27188 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x4006A34")] internal ContentInfo contentInfo; // Token: 0x04006A35 RID: 27189 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x4006A35")] private AlgorithmIdentifier encAlg; // Token: 0x04006A36 RID: 27190 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x4006A36")] private Asn1Set unprotectedAttributes; } }