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: 0x02001B55 RID: 6997
|
|
[Token(Token = "0x2001B55")]
|
|
public class SignatureAndHashAlgorithm
|
|
{
|
|
// Token: 0x0600ADE4 RID: 44516 RVA: 0x0025D5FC File Offset: 0x0025B7FC
|
|
[Token(Token = "0x600ADE4")]
|
|
[Address(RVA = "0x197ABC0", Offset = "0x19799C0", VA = "0x18197ABC0")]
|
|
public SignatureAndHashAlgorithm(byte hash, byte signature)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600ADE4)
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x17001B96 RID: 7062
|
|
// (get) Token: 0x0600ADE5 RID: 44517 RVA: 0x0025D650 File Offset: 0x0025B850
|
|
[Token(Token = "0x17001B96")]
|
|
public virtual byte Hash
|
|
{
|
|
[Token(Token = "0x600ADE5")]
|
|
[Address(RVA = "0x42D5E0", Offset = "0x42C3E0", VA = "0x18042D5E0", Slot = "4")]
|
|
get
|
|
{
|
|
return this.mHash;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001B97 RID: 7063
|
|
// (get) Token: 0x0600ADE6 RID: 44518 RVA: 0x0025D664 File Offset: 0x0025B864
|
|
[Token(Token = "0x17001B97")]
|
|
public virtual byte Signature
|
|
{
|
|
[Token(Token = "0x600ADE6")]
|
|
[Address(RVA = "0x49E540", Offset = "0x49D340", VA = "0x18049E540", Slot = "5")]
|
|
get
|
|
{
|
|
return this.mSignature;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600ADE7 RID: 44519 RVA: 0x0025D678 File Offset: 0x0025B878
|
|
[Token(Token = "0x600ADE7")]
|
|
[Address(RVA = "0x197A870", Offset = "0x1979670", VA = "0x18197A870", 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: 0x0600ADE8 RID: 44520 RVA: 0x0025D6B4 File Offset: 0x0025B8B4
|
|
[Token(Token = "0x600ADE8")]
|
|
[Address(RVA = "0x197A9B0", Offset = "0x19797B0", VA = "0x18197A9B0", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600ADE8)
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x0600ADE9 RID: 44521 RVA: 0x0025D6D0 File Offset: 0x0025B8D0
|
|
[Token(Token = "0x600ADE9")]
|
|
[Address(RVA = "0x197A7C0", Offset = "0x19795C0", VA = "0x18197A7C0", Slot = "6")]
|
|
public virtual void Encode(Stream output)
|
|
{
|
|
string text = this.ToString();
|
|
TlsUtilities.WriteUint8(this.Hash, output);
|
|
}
|
|
|
|
// Token: 0x0600ADEA RID: 44522 RVA: 0x0025D6F0 File Offset: 0x0025B8F0
|
|
[Token(Token = "0x600ADEA")]
|
|
[Address(RVA = "0x197AA00", Offset = "0x1979800", VA = "0x18197AA00")]
|
|
public static SignatureAndHashAlgorithm Parse(Stream input)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600ADEA)
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x04006FC0 RID: 28608
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006FC0")]
|
|
protected readonly byte mHash;
|
|
|
|
// Token: 0x04006FC1 RID: 28609
|
|
[FieldOffset(Offset = "0x11")]
|
|
[Token(Token = "0x4006FC1")]
|
|
protected readonly byte mSignature;
|
|
}
|
|
}
|