116 lines
7.3 KiB
C#
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: 0x02001C7E RID: 7294
|
|
[Token(Token = "0x2001C7E")]
|
|
public class UrlAndHash
|
|
{
|
|
// Token: 0x0600B481 RID: 46209 RVA: 0x0026F3F8 File Offset: 0x0026D5F8
|
|
[Token(Token = "0x600B481")]
|
|
[Address(RVA = "0x46FD50", Offset = "0x46ED50", VA = "0x18046FD50")]
|
|
public UrlAndHash(string url, byte[] sha1Hash)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B481)
|
|
|
|
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: 0x17001C6E RID: 7278
|
|
// (get) Token: 0x0600B482 RID: 46210 RVA: 0x0026F458 File Offset: 0x0026D658
|
|
[Token(Token = "0x17001C6E")]
|
|
public virtual string Url
|
|
{
|
|
[Token(Token = "0x600B482")]
|
|
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "4")]
|
|
get
|
|
{
|
|
return this.mUrl;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001C6F RID: 7279
|
|
// (get) Token: 0x0600B483 RID: 46211 RVA: 0x0026F46C File Offset: 0x0026D66C
|
|
[Token(Token = "0x17001C6F")]
|
|
public virtual byte[] Sha1Hash
|
|
{
|
|
[Token(Token = "0x600B483")]
|
|
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0", Slot = "5")]
|
|
get
|
|
{
|
|
return this.mSha1Hash;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B484 RID: 46212 RVA: 0x0026F480 File Offset: 0x0026D680
|
|
[Token(Token = "0x600B484")]
|
|
[Address(RVA = "0x46F990", Offset = "0x46E990", VA = "0x18046F990", 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: 0x0600B485 RID: 46213 RVA: 0x0026F4C8 File Offset: 0x0026D6C8
|
|
[Token(Token = "0x600B485")]
|
|
[Address(RVA = "0x46FAC0", Offset = "0x46EAC0", VA = "0x18046FAC0")]
|
|
public static UrlAndHash Parse(TlsContext context, Stream input)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B485)
|
|
|
|
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: 0x0400724C RID: 29260
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400724C")]
|
|
protected readonly string mUrl;
|
|
|
|
// Token: 0x0400724D RID: 29261
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400724D")]
|
|
protected readonly byte[] mSha1Hash;
|
|
}
|
|
}
|