Files
2026-04-10 22:50:51 +02:00

116 lines
7.3 KiB
C#

using System;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
{
// Token: 0x02001B9E RID: 7070
[Token(Token = "0x2001B9E")]
public class UrlAndHash
{
// Token: 0x0600B0B3 RID: 45235 RVA: 0x00266234 File Offset: 0x00264434
[Token(Token = "0x600B0B3")]
[Address(RVA = "0x18359B0", Offset = "0x18347B0", VA = "0x1818359B0")]
public UrlAndHash(string url, byte[] sha1Hash)
{
/*
An exception occurred when decompiling this method (0600B0B3)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.UrlAndHash::.ctor(System.String,System.Byte[])
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_44:
stloc:ArgumentException(var_1_53, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("must have length == 20, if present"), ldstr:string("sha1Hash")))
}
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: 0x17001BD1 RID: 7121
// (get) Token: 0x0600B0B4 RID: 45236 RVA: 0x00266294 File Offset: 0x00264494
[Token(Token = "0x17001BD1")]
public virtual string Url
{
[Token(Token = "0x600B0B4")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "4")]
get
{
return this.mUrl;
}
}
// Token: 0x17001BD2 RID: 7122
// (get) Token: 0x0600B0B5 RID: 45237 RVA: 0x002662A8 File Offset: 0x002644A8
[Token(Token = "0x17001BD2")]
public virtual byte[] Sha1Hash
{
[Token(Token = "0x600B0B5")]
[Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "5")]
get
{
return this.mSha1Hash;
}
}
// Token: 0x0600B0B6 RID: 45238 RVA: 0x002662BC File Offset: 0x002644BC
[Token(Token = "0x600B0B6")]
[Address(RVA = "0x18355F0", Offset = "0x18343F0", VA = "0x1818355F0", Slot = "6")]
public virtual void Encode(Stream output)
{
TlsUtilities.WriteOpaque16(Strings.ToByteArray(this.mUrl), output);
if (this.mSha1Hash != (ulong)0L)
{
byte[] array = this.mSha1Hash;
int num = output.ReadByte();
return;
}
bool canRead = output.CanRead;
}
// Token: 0x0600B0B7 RID: 45239 RVA: 0x00266304 File Offset: 0x00264504
[Token(Token = "0x600B0B7")]
[Address(RVA = "0x1835720", Offset = "0x1834520", VA = "0x181835720")]
public static UrlAndHash Parse(TlsContext context, Stream input)
{
/*
An exception occurred when decompiling this method (0600B0B7)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.UrlAndHash BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.UrlAndHash::Parse(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsContext,System.IO.Stream)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_5F:
stloc:ArgumentException(var_6_6E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("must have length == 20, if present"), ldstr:string("sha1Hash")))
}
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: 0x04007093 RID: 28819
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4007093")]
protected readonly string mUrl;
// Token: 0x04007094 RID: 28820
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4007094")]
protected readonly byte[] mSha1Hash;
}
}