160 lines
11 KiB
C#
160 lines
11 KiB
C#
using System;
|
|
using System.IO;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
|
|
{
|
|
// Token: 0x02001C35 RID: 7221
|
|
[Token(Token = "0x2001C35")]
|
|
public class SignatureAndHashAlgorithm
|
|
{
|
|
// Token: 0x0600B1B2 RID: 45490 RVA: 0x002666A0 File Offset: 0x002648A0
|
|
[Token(Token = "0x600B1B2")]
|
|
[Address(RVA = "0x498CC0", Offset = "0x497CC0", VA = "0x180498CC0")]
|
|
public SignatureAndHashAlgorithm(byte hash, byte signature)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B1B2)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.SignatureAndHashAlgorithm::.ctor(System.Byte,System.Byte)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_27:
|
|
stloc:ArgumentException(var_0_36, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("should be a uint8"), ldstr:string("hash")))
|
|
stloc:ArgumentException(var_1_46, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("MUST NOT be \"anonymous\""), ldstr:string("signature")))
|
|
}
|
|
|
|
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: 0x17001C33 RID: 7219
|
|
// (get) Token: 0x0600B1B3 RID: 45491 RVA: 0x002666F4 File Offset: 0x002648F4
|
|
[Token(Token = "0x17001C33")]
|
|
public virtual byte Hash
|
|
{
|
|
[Token(Token = "0x600B1B3")]
|
|
[Address(RVA = "0x4944B0", Offset = "0x4934B0", VA = "0x1804944B0", Slot = "4")]
|
|
get
|
|
{
|
|
return this.mHash;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001C34 RID: 7220
|
|
// (get) Token: 0x0600B1B4 RID: 45492 RVA: 0x00266708 File Offset: 0x00264908
|
|
[Token(Token = "0x17001C34")]
|
|
public virtual byte Signature
|
|
{
|
|
[Token(Token = "0x600B1B4")]
|
|
[Address(RVA = "0x498E20", Offset = "0x497E20", VA = "0x180498E20", Slot = "5")]
|
|
get
|
|
{
|
|
return this.mSignature;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B1B5 RID: 45493 RVA: 0x0026671C File Offset: 0x0026491C
|
|
[Token(Token = "0x600B1B5")]
|
|
[Address(RVA = "0x498970", Offset = "0x497970", VA = "0x180498970", Slot = "0")]
|
|
public override bool Equals(object obj)
|
|
{
|
|
while (obj != 0 && obj != 0)
|
|
{
|
|
if (obj != 0)
|
|
{
|
|
string text = obj.ToString();
|
|
string text2 = this.ToString();
|
|
if (text == text2)
|
|
{
|
|
byte hash = this.Hash;
|
|
bool flag;
|
|
return flag;
|
|
}
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B1B6 RID: 45494 RVA: 0x00266758 File Offset: 0x00264958
|
|
[Token(Token = "0x600B1B6")]
|
|
[Address(RVA = "0x498AB0", Offset = "0x497AB0", VA = "0x180498AB0", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B1B6)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.SignatureAndHashAlgorithm::GetHashCode()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:string(var_0_06, callvirt:string(object::ToString, ldloc:SignatureAndHashAlgorithm[exp:object](this)))
|
|
stloc:uint8(var_1_0D, callvirtgetter:uint8(SignatureAndHashAlgorithm::get_Hash, ldloc:SignatureAndHashAlgorithm(this)))
|
|
}
|
|
|
|
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: 0x0600B1B7 RID: 45495 RVA: 0x00266774 File Offset: 0x00264974
|
|
[Token(Token = "0x600B1B7")]
|
|
[Address(RVA = "0x4988C0", Offset = "0x4978C0", VA = "0x1804988C0", Slot = "6")]
|
|
public virtual void Encode(Stream output)
|
|
{
|
|
string text = this.ToString();
|
|
TlsUtilities.WriteUint8(this.Hash, output);
|
|
}
|
|
|
|
// Token: 0x0600B1B8 RID: 45496 RVA: 0x00266794 File Offset: 0x00264994
|
|
[Token(Token = "0x600B1B8")]
|
|
[Address(RVA = "0x498B00", Offset = "0x497B00", VA = "0x180498B00")]
|
|
public static SignatureAndHashAlgorithm Parse(Stream input)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B1B8)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.SignatureAndHashAlgorithm BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.SignatureAndHashAlgorithm::Parse(System.IO.Stream)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_30:
|
|
stloc:ArgumentException(var_3_3F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("should be a uint8"), ldstr:string("hash")))
|
|
stloc:ArgumentException(var_4_4F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("MUST NOT be \"anonymous\""), ldstr:string("signature")))
|
|
}
|
|
|
|
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: 0x04007179 RID: 29049
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007179")]
|
|
protected readonly byte mHash;
|
|
|
|
// Token: 0x0400717A RID: 29050
|
|
[FieldOffset(Offset = "0x11")]
|
|
[Token(Token = "0x400717A")]
|
|
protected readonly byte mSignature;
|
|
}
|
|
}
|