Files
2026-04-08 23:40:05 +02:00

240 lines
9.6 KiB
C#

using System;
using System.IO;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
{
// Token: 0x020017C4 RID: 6084
[Token(Token = "0x20017C4")]
[StructLayout(3)]
public class DerApplicationSpecific : Asn1Object
{
// Token: 0x0600A407 RID: 41991 RVA: 0x00262A44 File Offset: 0x00260C44
[Token(Token = "0x600A407")]
[Address(RVA = "0x1ECECF0", Offset = "0x1ECD6F0", VA = "0x181ECECF0")]
internal DerApplicationSpecific(bool isConstructed, int tag, byte[] octets)
{
this.isConstructed = isConstructed;
this.tag = tag;
this.octets = octets;
}
// Token: 0x0600A408 RID: 41992 RVA: 0x00262A6C File Offset: 0x00260C6C
[Token(Token = "0x600A408")]
[Address(RVA = "0x1ECECB0", Offset = "0x1ECD6B0", VA = "0x181ECECB0")]
public DerApplicationSpecific(int tag, byte[] octets)
{
this.tag = tag;
this.octets = octets;
this.isConstructed = false;
}
// Token: 0x0600A409 RID: 41993 RVA: 0x00262A94 File Offset: 0x00260C94
[Token(Token = "0x600A409")]
[Address(RVA = "0x1ECEC10", Offset = "0x1ECD610", VA = "0x181ECEC10")]
public DerApplicationSpecific(int tag, Asn1Encodable obj)
{
Asn1Object asn1Object = obj.ToAsn1Object();
byte[] derEncoded = asn1Object.GetDerEncoded();
bool flag = Asn1TaggedObject.IsConstructed(true, asn1Object);
this.tag = tag;
this.octets = derEncoded;
this.isConstructed = flag;
}
// Token: 0x0600A40A RID: 41994 RVA: 0x00262AD8 File Offset: 0x00260CD8
[Token(Token = "0x600A40A")]
[Address(RVA = "0x1ECE8F0", Offset = "0x1ECD2F0", VA = "0x181ECE8F0")]
public DerApplicationSpecific(bool isExplicit, int tag, Asn1Encodable obj)
{
Asn1Object asn1Object = obj.ToAsn1Object();
byte[] derEncoded = asn1Object.GetDerEncoded();
bool flag = Asn1TaggedObject.IsConstructed(isExplicit, asn1Object);
this.isConstructed = flag;
this.tag = tag;
if (!isExplicit)
{
int num = derEncoded.Length;
byte b = derEncoded[0];
uint num2;
num -= (int)num2;
byte[] array = new byte[num];
int length = array.Length;
int num3 = 0;
Array.Copy(derEncoded, (int)num2, array, num3, length);
this.octets = array;
return;
}
this.octets = derEncoded;
throw new NullReferenceException();
}
// Token: 0x0600A40B RID: 41995 RVA: 0x00262B74 File Offset: 0x00260D74
[Token(Token = "0x600A40B")]
[Address(RVA = "0x1ECEAA0", Offset = "0x1ECD4A0", VA = "0x181ECEAA0")]
public DerApplicationSpecific(int tagNo, Asn1EncodableVector vec)
{
this.tag = tagNo;
this.isConstructed = true;
MemoryStream memoryStream = new MemoryStream();
int num = 0;
int count = vec.Count;
if (num != count)
{
byte[] derEncoded = vec[num].GetDerEncoded();
int num2 = memoryStream.ReadByte();
num++;
}
}
// Token: 0x0600A40C RID: 41996 RVA: 0x00262BEC File Offset: 0x00260DEC
[Token(Token = "0x600A40C")]
[Address(RVA = "0x1ECE470", Offset = "0x1ECCE70", VA = "0x181ECE470")]
private int GetLengthOfHeader(byte[] data)
{
byte b = data[0];
throw new NullReferenceException();
}
// Token: 0x0600A40D RID: 41997 RVA: 0x00262C18 File Offset: 0x00260E18
[Token(Token = "0x600A40D")]
[Address(RVA = "0x559440", Offset = "0x557E40", VA = "0x180559440")]
public bool IsConstructed()
{
return this.isConstructed;
}
// Token: 0x0600A40E RID: 41998 RVA: 0x00262C2C File Offset: 0x00260E2C
[Token(Token = "0x600A40E")]
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
public byte[] GetContents()
{
return this.octets;
}
// Token: 0x170019AA RID: 6570
// (get) Token: 0x0600A40F RID: 41999 RVA: 0x00262C40 File Offset: 0x00260E40
[Token(Token = "0x170019AA")]
public int ApplicationTag
{
[Token(Token = "0x600A40F")]
[Address(RVA = "0x55D550", Offset = "0x55BF50", VA = "0x18055D550")]
get
{
return this.tag;
}
}
// Token: 0x0600A410 RID: 42000 RVA: 0x00262C54 File Offset: 0x00260E54
[Token(Token = "0x600A410")]
[Address(RVA = "0x1ECE550", Offset = "0x1ECCF50", VA = "0x181ECE550")]
public Asn1Object GetObject()
{
return Asn1Object.FromByteArray(this.octets);
}
// Token: 0x0600A411 RID: 42001 RVA: 0x00262C6C File Offset: 0x00260E6C
[Token(Token = "0x600A411")]
[Address(RVA = "0x1ECE560", Offset = "0x1ECCF60", VA = "0x181ECE560")]
public Asn1Object GetObject(int derTagNo)
{
/*
An exception occurred when decompiling this method (0600A411)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerApplicationSpecific::GetObject(System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_61:
stloc:IOException(var_9_6B, newobj:IOException(IOException::.ctor, ldstr:string("unsupported tag number")))
}
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1852
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1878
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.FlattenBasicBlocks(ILNode node) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 1846
at ICSharpCode.Decompiler.ILAst.ILAstOptimizer.Optimize(DecompilerContext context, ILBlock method, AutoPropertyProvider autoPropertyProvider, StateMachineKind& stateMachineKind, MethodDef& inlinedMethod, AsyncMethodDebugInfo& asyncInfo, ILAstOptimizationStep abortBeforeStep) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\ILAst\ILAstOptimizer.cs:line 355
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(IEnumerable`1 parameters, MethodDebugInfoBuilder& builder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 123
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 88
--- End of inner exception stack trace ---
at ICSharpCode.Decompiler.Ast.AstMethodBodyBuilder.CreateMethodBody(MethodDef methodDef, DecompilerContext context, AutoPropertyProvider autoPropertyProvider, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, StringBuilder sb, MethodDebugInfoBuilder& stmtsBuilder) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstMethodBodyBuilder.cs:line 92
at ICSharpCode.Decompiler.Ast.AstBuilder.AddMethodBody(EntityDeclaration methodNode, EntityDeclaration& updatedNode, MethodDef method, IEnumerable`1 parameters, Boolean valueParameterIsKeyword, MethodKind methodKind) in D:\a\dnSpy\dnSpy\Extensions\ILSpy.Decompiler\ICSharpCode.Decompiler\ICSharpCode.Decompiler\Ast\AstBuilder.cs:line 1663
*/;
}
// Token: 0x0600A412 RID: 42002 RVA: 0x00262CE8 File Offset: 0x00260EE8
[Token(Token = "0x600A412")]
[Address(RVA = "0x1ECE420", Offset = "0x1ECCE20", VA = "0x181ECE420", Slot = "6")]
internal override void Encode(DerOutputStream derOut)
{
byte[] array = this.octets;
int num = this.tag;
derOut.WriteEncoded(64, num, array);
}
// Token: 0x0600A413 RID: 42003 RVA: 0x00262D14 File Offset: 0x00260F14
[Token(Token = "0x600A413")]
[Address(RVA = "0x1ECE2B0", Offset = "0x1ECCCB0", VA = "0x181ECE2B0", Slot = "7")]
protected override bool Asn1Equals(Asn1Object asn1Object)
{
if (asn1Object == 0)
{
return;
}
int num = 0;
if (asn1Object != 0 && (this.isConstructed ? 1 : 0) == num && this.tag == num)
{
byte[] array = this.octets;
bool flag;
return flag;
}
}
// Token: 0x0600A414 RID: 42004 RVA: 0x00262D48 File Offset: 0x00260F48
[Token(Token = "0x600A414")]
[Address(RVA = "0x1ECE380", Offset = "0x1ECCD80", VA = "0x181ECE380", Slot = "8")]
protected override int Asn1GetHashCode()
{
bool flag = this.isConstructed;
int num = this.tag;
return Arrays.GetHashCode(this.octets);
}
// Token: 0x0600A415 RID: 42005 RVA: 0x00262D70 File Offset: 0x00260F70
[Token(Token = "0x600A415")]
[Address(RVA = "0x1ECE780", Offset = "0x1ECD180", VA = "0x181ECE780")]
private byte[] ReplaceTagNumber(int newTag, byte[] input)
{
int num = input.Length;
byte b = input[0];
byte b2 = input[0];
uint num2;
num2 += (uint)1;
uint num3;
num -= (int)num3;
byte[] array = new byte[num + 1];
array[0] = (byte)newTag;
uint num4;
Array.Copy(input, (int)num3, array, (int)num4, num);
return array;
}
// Token: 0x04006B69 RID: 27497
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006B69")]
private readonly bool isConstructed;
// Token: 0x04006B6A RID: 27498
[global::Cpp2IlInjected.FieldOffset(Offset = "0x14")]
[Token(Token = "0x4006B6A")]
private readonly int tag;
// Token: 0x04006B6B RID: 27499
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006B6B")]
private readonly byte[] octets;
}
}