m
This commit is contained in:
@@ -0,0 +1,338 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
|
||||
{
|
||||
// Token: 0x02001E83 RID: 7811
|
||||
[Token(Token = "0x2001E83")]
|
||||
public class DerBitString : DerStringBase
|
||||
{
|
||||
// Token: 0x0600C3C5 RID: 50117 RVA: 0x002C3DF4 File Offset: 0x002C1FF4
|
||||
[Token(Token = "0x600C3C5")]
|
||||
[Address(RVA = "0x23A6510", Offset = "0x23A5510", VA = "0x1823A6510")]
|
||||
public static DerBitString GetInstance(object obj)
|
||||
{
|
||||
if (obj != 0 && obj == 0)
|
||||
{
|
||||
if (obj == 0)
|
||||
{
|
||||
goto IL_1C;
|
||||
}
|
||||
if (obj == 0)
|
||||
{
|
||||
goto IL_35;
|
||||
}
|
||||
}
|
||||
if (obj == 0 || obj != 0)
|
||||
{
|
||||
}
|
||||
IL_1C:
|
||||
string typeName = Platform.GetTypeName(obj);
|
||||
ArgumentException ex = new ArgumentException("illegal object in GetInstance: " + typeName);
|
||||
IL_35:
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C3C6 RID: 50118 RVA: 0x0000220F File Offset: 0x0000040F
|
||||
[Token(Token = "0x600C3C6")]
|
||||
[Address(RVA = "0x23A6720", Offset = "0x23A5720", VA = "0x1823A6720")]
|
||||
public static DerBitString GetInstance(Asn1TaggedObject obj, bool isExplicit)
|
||||
{
|
||||
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
|
||||
}
|
||||
|
||||
// Token: 0x0600C3C7 RID: 50119 RVA: 0x002C3E44 File Offset: 0x002C2044
|
||||
[Token(Token = "0x600C3C7")]
|
||||
[Address(RVA = "0x23A6B50", Offset = "0x23A5B50", VA = "0x1823A6B50")]
|
||||
public DerBitString(byte[] data, int padBits)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600C3C7)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerBitString::.ctor(System.Byte[],System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_3C:
|
||||
stloc:ArgumentException(var_2_4B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("must be in the range 0 to 7"), ldstr:string("padBits")))
|
||||
}
|
||||
|
||||
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.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: 0x0600C3C8 RID: 50120 RVA: 0x002C3E9C File Offset: 0x002C209C
|
||||
[Token(Token = "0x600C3C8")]
|
||||
[Address(RVA = "0x23A6C80", Offset = "0x23A5C80", VA = "0x1823A6C80")]
|
||||
public DerBitString(byte[] data)
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x0600C3C9 RID: 50121 RVA: 0x002C3EAC File Offset: 0x002C20AC
|
||||
[Token(Token = "0x600C3C9")]
|
||||
[Address(RVA = "0x23A6CD0", Offset = "0x23A5CD0", VA = "0x1823A6CD0")]
|
||||
public DerBitString(int namedBits)
|
||||
{
|
||||
if (namedBits != 0)
|
||||
{
|
||||
int num = 0;
|
||||
int num2 = BigInteger.BitLen(namedBits);
|
||||
num2 += 7;
|
||||
num2 += num;
|
||||
byte[] array = new byte[num2];
|
||||
int num3 = 0;
|
||||
if (num2 - 1 > 0)
|
||||
{
|
||||
num3++;
|
||||
}
|
||||
int num4 = num2 - 1;
|
||||
if (namedBits == 1)
|
||||
{
|
||||
num3++;
|
||||
uint num5;
|
||||
while (namedBits == (int)num5)
|
||||
{
|
||||
}
|
||||
}
|
||||
this.mData = array;
|
||||
this.mPadBits = num3;
|
||||
return;
|
||||
}
|
||||
byte[] array2 = new byte[0];
|
||||
int num6 = 0;
|
||||
this.mPadBits = num6;
|
||||
this.mData = array2;
|
||||
}
|
||||
|
||||
// Token: 0x0600C3CA RID: 50122 RVA: 0x002C3F2C File Offset: 0x002C212C
|
||||
[Token(Token = "0x600C3CA")]
|
||||
[Address(RVA = "0x23A6C90", Offset = "0x23A5C90", VA = "0x1823A6C90")]
|
||||
public DerBitString(Asn1Encodable obj)
|
||||
{
|
||||
byte[] derEncoded = obj.GetDerEncoded();
|
||||
}
|
||||
|
||||
// Token: 0x0600C3CB RID: 50123 RVA: 0x002C3F48 File Offset: 0x002C2148
|
||||
[Token(Token = "0x600C3CB")]
|
||||
[Address(RVA = "0x23A68B0", Offset = "0x23A58B0", VA = "0x1823A68B0", Slot = "11")]
|
||||
public virtual byte[] GetOctets()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600C3CB)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerBitString::GetOctets()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_15:
|
||||
stloc:InvalidOperationException(var_0_1F, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("attempt to get non-octet aligned data from BIT STRING")))
|
||||
}
|
||||
|
||||
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: 0x0600C3CC RID: 50124 RVA: 0x002C3F74 File Offset: 0x002C2174
|
||||
[Token(Token = "0x600C3CC")]
|
||||
[Address(RVA = "0x23A6460", Offset = "0x23A5460", VA = "0x1823A6460", Slot = "12")]
|
||||
public virtual byte[] GetBytes()
|
||||
{
|
||||
byte[] array = Arrays.Clone(this.mData);
|
||||
int num = this.mPadBits;
|
||||
if (num > 0)
|
||||
{
|
||||
int length = array.Length;
|
||||
int num2 = length - 1;
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x17001E49 RID: 7753
|
||||
// (get) Token: 0x0600C3CD RID: 50125 RVA: 0x002C3FAC File Offset: 0x002C21AC
|
||||
[Token(Token = "0x17001E49")]
|
||||
public virtual int PadBits
|
||||
{
|
||||
[Token(Token = "0x600C3CD")]
|
||||
[Address(RVA = "0x411540", Offset = "0x410540", VA = "0x180411540", Slot = "13")]
|
||||
get
|
||||
{
|
||||
return this.mPadBits;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x17001E4A RID: 7754
|
||||
// (get) Token: 0x0600C3CE RID: 50126 RVA: 0x002C3FC0 File Offset: 0x002C21C0
|
||||
[Token(Token = "0x17001E4A")]
|
||||
public virtual int IntValue
|
||||
{
|
||||
[Token(Token = "0x600C3CE")]
|
||||
[Address(RVA = "0x23A6E30", Offset = "0x23A5E30", VA = "0x1823A6E30", Slot = "14")]
|
||||
get
|
||||
{
|
||||
byte[] array = this.mData;
|
||||
int num = 0;
|
||||
int length = array.Length;
|
||||
int num2 = Math.Min(4, length);
|
||||
if (num2 > 0)
|
||||
{
|
||||
byte[] array2 = this.mData;
|
||||
num++;
|
||||
num += 8;
|
||||
}
|
||||
if (this.mPadBits > 0)
|
||||
{
|
||||
byte[] array3 = this.mData;
|
||||
if (num2 == array3.Length)
|
||||
{
|
||||
}
|
||||
}
|
||||
return num;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600C3CF RID: 50127 RVA: 0x002C401C File Offset: 0x002C221C
|
||||
[Token(Token = "0x600C3CF")]
|
||||
[Address(RVA = "0x23A6090", Offset = "0x23A5090", VA = "0x1823A6090", Slot = "6")]
|
||||
internal override void Encode(DerOutputStream derOut)
|
||||
{
|
||||
int num = this.mPadBits;
|
||||
if (num > 0)
|
||||
{
|
||||
byte[] array = this.mData;
|
||||
int length = array.Length;
|
||||
int num2 = length - 1;
|
||||
num2 = num;
|
||||
if (num2 != length)
|
||||
{
|
||||
byte[] array2 = Arrays.Prepend(array, (byte)num);
|
||||
int num3 = array2.Length - 1;
|
||||
int length2 = array2.Length;
|
||||
derOut.WriteLength(length2);
|
||||
int num4 = derOut.ReadByte();
|
||||
return;
|
||||
}
|
||||
}
|
||||
int num5 = this.mData.Length;
|
||||
num5++;
|
||||
if (num5 != 0)
|
||||
{
|
||||
uint num6;
|
||||
num6 += (uint)1;
|
||||
while (num5 != 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C3D0 RID: 50128 RVA: 0x002C40A8 File Offset: 0x002C22A8
|
||||
[Token(Token = "0x600C3D0")]
|
||||
[Address(RVA = "0x23A6010", Offset = "0x23A5010", VA = "0x1823A6010", Slot = "8")]
|
||||
protected override int Asn1GetHashCode()
|
||||
{
|
||||
int num = this.mPadBits;
|
||||
return Arrays.GetHashCode(this.mData);
|
||||
}
|
||||
|
||||
// Token: 0x0600C3D1 RID: 50129 RVA: 0x002C40C8 File Offset: 0x002C22C8
|
||||
[Token(Token = "0x600C3D1")]
|
||||
[Address(RVA = "0x23A5F40", Offset = "0x23A4F40", VA = "0x1823A5F40", Slot = "7")]
|
||||
protected override bool Asn1Equals(Asn1Object asn1Object)
|
||||
{
|
||||
if (asn1Object == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int num = 0;
|
||||
if (asn1Object != 0 && this.mPadBits == num)
|
||||
{
|
||||
byte[] array = this.mData;
|
||||
bool flag;
|
||||
return flag;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600C3D2 RID: 50130 RVA: 0x002C40F4 File Offset: 0x002C22F4
|
||||
[Token(Token = "0x600C3D2")]
|
||||
[Address(RVA = "0x23A6940", Offset = "0x23A5940", VA = "0x1823A6940", Slot = "10")]
|
||||
public override string GetString()
|
||||
{
|
||||
StringBuilder stringBuilder = new StringBuilder("#");
|
||||
byte[] derEncoded = base.GetDerEncoded();
|
||||
int num = 0;
|
||||
int length = derEncoded.Length;
|
||||
if (num != length)
|
||||
{
|
||||
byte b;
|
||||
char c = DerBitString.table[(int)b];
|
||||
StringBuilder stringBuilder2 = stringBuilder.Append(c);
|
||||
char[] array = DerBitString.table;
|
||||
char c2;
|
||||
StringBuilder stringBuilder3 = stringBuilder.Append(c2);
|
||||
num++;
|
||||
}
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C3D3 RID: 50131 RVA: 0x002C4154 File Offset: 0x002C2354
|
||||
[Token(Token = "0x600C3D3")]
|
||||
[Address(RVA = "0x23A62E0", Offset = "0x23A52E0", VA = "0x1823A62E0")]
|
||||
internal static DerBitString FromAsn1Octets(byte[] octets)
|
||||
{
|
||||
int length = octets.Length;
|
||||
byte b = octets[0];
|
||||
int length2 = octets.Length;
|
||||
byte[] array = Arrays.CopyOfRange(octets, 1, length2);
|
||||
if (array.Length != 0)
|
||||
{
|
||||
BerBitString berBitString = new BerBitString(array, (int)b);
|
||||
}
|
||||
DerBitString derBitString = new DerBitString(array, (int)b);
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600C3D4 RID: 50132 RVA: 0x002C41A0 File Offset: 0x002C23A0
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x600C3D4")]
|
||||
[Address(RVA = "0x23A6AF0", Offset = "0x23A5AF0", VA = "0x1823A6AF0")]
|
||||
static DerBitString()
|
||||
{
|
||||
char[] array = new char[16];
|
||||
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.59F5BD34B6C013DEACC784F69C67E95150033A84).FieldHandle);
|
||||
DerBitString.table = array;
|
||||
}
|
||||
|
||||
// Token: 0x04007B69 RID: 31593
|
||||
[Token(Token = "0x4007B69")]
|
||||
private static readonly char[] table;
|
||||
|
||||
// Token: 0x04007B6A RID: 31594
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007B6A")]
|
||||
protected readonly byte[] mData;
|
||||
|
||||
// Token: 0x04007B6B RID: 31595
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007B6B")]
|
||||
protected readonly int mPadBits;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user