Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Asn1/Utilities/Asn1Dump.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

256 lines
6.8 KiB
C#

using System;
using System.Collections;
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: 0x02001F21 RID: 7969
[Token(Token = "0x2001F21")]
public sealed class Asn1Dump
{
// Token: 0x0600C821 RID: 51233 RVA: 0x002D5218 File Offset: 0x002D3418
[Token(Token = "0x600C821")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
private Asn1Dump()
{
}
// Token: 0x0600C822 RID: 51234 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600C822")]
[Address(RVA = "0x2D7E110", Offset = "0x2D7D110", VA = "0x182D7E110")]
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: 0x0600C823 RID: 51235 RVA: 0x002D522C File Offset: 0x002D342C
[Token(Token = "0x600C823")]
[Address(RVA = "0x2D81870", Offset = "0x2D80870", VA = "0x182D81870")]
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 == 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: 0x0600C824 RID: 51236 RVA: 0x002D53C0 File Offset: 0x002D35C0
[Token(Token = "0x600C824")]
[Address(RVA = "0x2D81130", Offset = "0x2D80130", VA = "0x182D81130")]
[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: 0x0600C825 RID: 51237 RVA: 0x002D53F8 File Offset: 0x002D35F8
[Token(Token = "0x600C825")]
[Address(RVA = "0x2D813B0", Offset = "0x2D803B0", VA = "0x182D813B0")]
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: 0x0600C826 RID: 51238 RVA: 0x002D5428 File Offset: 0x002D3628
[Token(Token = "0x600C826")]
[Address(RVA = "0x2D812E0", Offset = "0x2D802E0", VA = "0x182D812E0")]
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: 0x0600C827 RID: 51239 RVA: 0x002D5454 File Offset: 0x002D3654
[Token(Token = "0x600C827")]
[Address(RVA = "0x2D815F0", Offset = "0x2D805F0", VA = "0x182D815F0")]
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: 0x0600C828 RID: 51240 RVA: 0x002D5544 File Offset: 0x002D3744
[Token(Token = "0x600C828")]
[Address(RVA = "0x2D81520", Offset = "0x2D80520", VA = "0x182D81520")]
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: 0x0600C829 RID: 51241 RVA: 0x002D5574 File Offset: 0x002D3774
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600C829")]
[Address(RVA = "0x2D814B0", Offset = "0x2D804B0", VA = "0x182D814B0")]
static Asn1Dump()
{
string newLine = Platform.NewLine;
}
// Token: 0x04007D96 RID: 32150
[Token(Token = "0x4007D96")]
private static readonly string NewLine;
// Token: 0x04007D97 RID: 32151
[Token(Token = "0x4007D97")]
private const string Tab = " ";
// Token: 0x04007D98 RID: 32152
[Token(Token = "0x4007D98")]
private const int SampleSize = 32;
}
}