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

261 lines
6.8 KiB
C#

using System;
using System.Collections;
using System.Runtime.InteropServices;
using System.Text;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Utilities
{
// Token: 0x02001864 RID: 6244
[Token(Token = "0x2001864")]
[StructLayout(3)]
public sealed class Asn1Dump
{
// Token: 0x0600A879 RID: 43129 RVA: 0x00274490 File Offset: 0x00272690
[Token(Token = "0x600A879")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
private Asn1Dump()
{
}
// Token: 0x0600A87A RID: 43130 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600A87A")]
[Address(RVA = "0x2622760", Offset = "0x2621160", VA = "0x182622760")]
private static void AsString(string indent, bool verbose, Asn1Object obj, StringBuilder buf)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600A87B RID: 43131 RVA: 0x002744A4 File Offset: 0x002726A4
[Token(Token = "0x600A87B")]
[Address(RVA = "0x2625EC0", Offset = "0x26248C0", VA = "0x182625EC0")]
private static string outputApplicationSpecific(string type, string indent, bool verbose, DerApplicationSpecific app)
{
StringBuilder stringBuilder;
for (;;)
{
int num = 0;
stringBuilder = new StringBuilder();
if ((app.isConstructed ? 1 : 0) == num)
{
break;
}
Asn1Sequence instance = Asn1Sequence.GetInstance(app.GetObject(16));
object[] array = new object[6];
if (indent != 0)
{
}
array[0] = indent;
if (type != 0)
{
}
array[1] = type;
if (" ApplicationSpecific[" != 0)
{
}
array[2] = " ApplicationSpecific[";
int tag = app.tag;
if (tag != 0)
{
}
array[3] = tag;
if ("]" != 0)
{
}
array[4] = "]";
if (tag != 0)
{
}
array[5] = tag;
string text = string.Concat(array);
StringBuilder stringBuilder2 = stringBuilder.Append(text);
IEnumerator enumerator = instance.GetEnumerator();
if (enumerator != 0)
{
if (enumerator == 0)
{
}
if (enumerator == 0)
{
continue;
}
string text2 = indent + " ";
}
if (num != -1)
{
}
if (num == 0)
{
goto Block_3;
}
}
object[] array2 = new object[0];
if (indent != 0)
{
}
array2[0] = indent;
if (type != 0)
{
}
array2[1] = type;
if (" ApplicationSpecific[" != 0)
{
}
array2[2] = " ApplicationSpecific[";
int tag2 = app.tag;
if (tag2 != 0)
{
}
array2[3] = tag2;
if ("] (" != 0)
{
}
array2[4] = "] (";
string text3 = Hex.ToHexString(app.octets);
if (text3 != 0)
{
}
array2[5] = text3;
if (")" != 0)
{
}
array2[6] = ")";
if (text3 != 0)
{
}
array2[7] = text3;
return string.Concat(array2);
Block_3:
int hashCode = stringBuilder.GetHashCode();
throw new NullReferenceException();
}
// Token: 0x0600A87C RID: 43132 RVA: 0x0027463C File Offset: 0x0027283C
[Token(Token = "0x600A87C")]
[Address(RVA = "0x2625780", Offset = "0x2624180", VA = "0x182625780")]
[Obsolete]
public static string DumpAsString(object obj)
{
while (obj != 0)
{
StringBuilder stringBuilder = new StringBuilder();
if (obj != 0 && obj != 0)
{
throw new NullReferenceException();
}
}
int hashCode = obj.GetHashCode();
string text;
return text;
}
// Token: 0x0600A87D RID: 43133 RVA: 0x00274674 File Offset: 0x00272874
[Token(Token = "0x600A87D")]
[Address(RVA = "0x2625A00", Offset = "0x2624400", VA = "0x182625A00")]
public static string DumpAsString(Asn1Encodable obj)
{
StringBuilder stringBuilder = new StringBuilder();
Asn1Object asn1Object = obj.ToAsn1Object();
int num = 0;
Asn1Dump.AsString("", num != 0, asn1Object, stringBuilder);
throw new NullReferenceException();
}
// Token: 0x0600A87E RID: 43134 RVA: 0x002746A4 File Offset: 0x002728A4
[Token(Token = "0x600A87E")]
[Address(RVA = "0x2625930", Offset = "0x2624330", VA = "0x182625930")]
public static string DumpAsString(Asn1Encodable obj, bool verbose)
{
StringBuilder stringBuilder = new StringBuilder();
Asn1Object asn1Object = obj.ToAsn1Object();
Asn1Dump.AsString("", verbose, asn1Object, stringBuilder);
throw new NullReferenceException();
}
// Token: 0x0600A87F RID: 43135 RVA: 0x002746D0 File Offset: 0x002728D0
[Token(Token = "0x600A87F")]
[Address(RVA = "0x2625C40", Offset = "0x2624640", VA = "0x182625C40")]
private static string dumpBinaryDataAsString(string indent, byte[] bytes)
{
string text = indent + " ";
StringBuilder stringBuilder = new StringBuilder(" ");
int num = 0;
int num2 = bytes.Length;
if (num < num2)
{
num2 -= num;
StringBuilder stringBuilder2 = stringBuilder.Append(text);
int num3 = bytes.Length;
num3 -= num;
string text2 = Hex.ToHexString(bytes, num, num3);
StringBuilder stringBuilder3 = stringBuilder.Append(text2);
int num4 = bytes.Length;
num4 -= num;
if (num4 != 32)
{
uint num5;
num5 -= (uint)num4;
StringBuilder stringBuilder4 = stringBuilder.Append(" ");
while (num4 != 32)
{
}
}
StringBuilder stringBuilder5 = stringBuilder.Append(" ");
int num6 = bytes.Length;
num6 -= num;
string text3 = Hex.ToHexString(bytes, num, 32);
StringBuilder stringBuilder6 = stringBuilder.Append(text3);
StringBuilder stringBuilder7 = stringBuilder.Append(" ");
uint num7;
string text4 = Asn1Dump.calculateAscString(bytes, num, (int)num7);
StringBuilder stringBuilder8 = stringBuilder.Append(text4);
num += 32;
}
throw new NullReferenceException();
}
// Token: 0x0600A880 RID: 43136 RVA: 0x002747C0 File Offset: 0x002729C0
[Token(Token = "0x600A880")]
[Address(RVA = "0x2625B70", Offset = "0x2624570", VA = "0x182625B70")]
private static string calculateAscString(byte[] bytes, int off, int len)
{
StringBuilder stringBuilder = new StringBuilder();
if (off != len)
{
if (off <= 94)
{
byte b;
StringBuilder stringBuilder2 = stringBuilder.Append((char)b);
}
while (off != len)
{
}
}
throw new NullReferenceException();
}
// Token: 0x0600A881 RID: 43137 RVA: 0x002747F0 File Offset: 0x002729F0
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600A881")]
[Address(RVA = "0x2625B00", Offset = "0x2624500", VA = "0x182625B00")]
static Asn1Dump()
{
string newLine = Platform.NewLine;
}
// Token: 0x04006D9A RID: 28058
[Token(Token = "0x4006D9A")]
private static readonly string NewLine;
// Token: 0x04006D9B RID: 28059
[Token(Token = "0x4006D9B")]
private const string Tab = " ";
// Token: 0x04006D9C RID: 28060
[Token(Token = "0x4006D9C")]
private const int SampleSize = 32;
}
}