This commit is contained in:
niko
2026-04-08 23:40:05 +02:00
parent d6894bcbc7
commit 18dc73f922
7750 changed files with 1795369 additions and 0 deletions
@@ -0,0 +1,188 @@
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: 0x02001758 RID: 5976
[Token(Token = "0x2001758")]
[StructLayout(3)]
public class CmsEnvelopedDataParser : CmsContentInfoParser
{
// Token: 0x0600A15E RID: 41310 RVA: 0x00258778 File Offset: 0x00256978
[Token(Token = "0x600A15E")]
[Address(RVA = "0x1C75DE0", Offset = "0x1C747E0", VA = "0x181C75DE0")]
public CmsEnvelopedDataParser(byte[] envelopedData)
{
int num;
MemoryStream memoryStream = new MemoryStream(envelopedData, num != 0);
num = 0;
}
// Token: 0x0600A15F RID: 41311 RVA: 0x00258790 File Offset: 0x00256990
[Token(Token = "0x600A15F")]
[Address(RVA = "0x1C75E50", Offset = "0x1C74850", VA = "0x181C75E50")]
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: 0x17001950 RID: 6480
// (get) Token: 0x0600A160 RID: 41312 RVA: 0x0025883C File Offset: 0x00256A3C
[Token(Token = "0x17001950")]
public AlgorithmIdentifier EncryptionAlgorithmID
{
[Token(Token = "0x600A160")]
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
get
{
return this._encAlg;
}
}
// Token: 0x17001951 RID: 6481
// (get) Token: 0x0600A161 RID: 41313 RVA: 0x00258850 File Offset: 0x00256A50
[Token(Token = "0x17001951")]
public string EncryptionAlgOid
{
[Token(Token = "0x600A161")]
[Address(RVA = "0x1C72A70", Offset = "0x1C71470", VA = "0x181C72A70")]
get
{
Asn1Object asn1Object = this._encAlg.ToAsn1Object();
throw new NullReferenceException();
}
}
// Token: 0x17001952 RID: 6482
// (get) Token: 0x0600A162 RID: 41314 RVA: 0x00258870 File Offset: 0x00256A70
[Token(Token = "0x17001952")]
public Asn1Object EncryptionAlgParams
{
[Token(Token = "0x600A162")]
[Address(RVA = "0x1C72AB0", Offset = "0x1C714B0", VA = "0x181C72AB0")]
get
{
DerObjectIdentifier objectID = this._encAlg.ObjectID;
if (objectID == 0)
{
}
return objectID.ToAsn1Object();
}
}
// Token: 0x0600A163 RID: 41315 RVA: 0x0025889C File Offset: 0x00256A9C
[Token(Token = "0x600A163")]
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
public RecipientInformationStore GetRecipientInfos()
{
return this.recipientInfoStore;
}
// Token: 0x0600A164 RID: 41316 RVA: 0x002588B0 File Offset: 0x00256AB0
[Token(Token = "0x600A164")]
[Address(RVA = "0x1C75B20", Offset = "0x1C74520", VA = "0x181C75B20")]
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: 0x04006A37 RID: 27191
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A37")]
internal RecipientInformationStore recipientInfoStore;
// Token: 0x04006A38 RID: 27192
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006A38")]
internal EnvelopedDataParser envelopedData;
// Token: 0x04006A39 RID: 27193
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006A39")]
private AlgorithmIdentifier _encAlg;
// Token: 0x04006A3A RID: 27194
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006A3A")]
private BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.AttributeTable _unprotectedAttributes;
// Token: 0x04006A3B RID: 27195
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4006A3B")]
private bool _attrNotRead;
}
}