This commit is contained in:
niko
2026-04-10 22:50:51 +02:00
parent 6d1607d5a2
commit f18d448581
17033 changed files with 2863270 additions and 0 deletions
@@ -0,0 +1,127 @@
using System;
using System.Collections;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls
{
// Token: 0x02001B99 RID: 7065
[Token(Token = "0x2001B99")]
public abstract class TlsSrpUtilities
{
// Token: 0x0600B00C RID: 45068 RVA: 0x002644A8 File Offset: 0x002626A8
[Token(Token = "0x600B00C")]
[Address(RVA = "0x182BD50", Offset = "0x182AB50", VA = "0x18182BD50")]
public static void AddSrpExtension(IDictionary extensions, byte[] identity)
{
while (identity == 0)
{
}
TlsUtilities.CheckUint8(identity.Length);
int length = identity.Length;
byte[] array = Arrays.Prepend(identity, (byte)length);
}
// Token: 0x0600B00D RID: 45069 RVA: 0x002644D4 File Offset: 0x002626D4
[Token(Token = "0x600B00D")]
[Address(RVA = "0x182BFC0", Offset = "0x182ADC0", VA = "0x18182BFC0")]
public static byte[] GetSrpExtension(IDictionary extensions)
{
byte[] extensionData = TlsUtilities.GetExtensionData(extensions, 12);
if (extensionData == 0)
{
return extensionData;
}
int num;
MemoryStream memoryStream = new MemoryStream(extensionData, num != 0);
num = 0;
byte[] array = TlsUtilities.ReadOpaque8(memoryStream);
TlsProtocol.AssertEmpty(memoryStream);
return array;
}
// Token: 0x0600B00E RID: 45070 RVA: 0x00264508 File Offset: 0x00262708
[Token(Token = "0x600B00E")]
[Address(RVA = "0x182BEC0", Offset = "0x182ACC0", VA = "0x18182BEC0")]
public static byte[] CreateSrpExtension(byte[] identity)
{
while (identity == 0)
{
}
TlsUtilities.CheckUint8(identity.Length);
int length = identity.Length;
return Arrays.Prepend(identity, (byte)length);
}
// Token: 0x0600B00F RID: 45071 RVA: 0x00264534 File Offset: 0x00262734
[Token(Token = "0x600B00F")]
[Address(RVA = "0x182C0C0", Offset = "0x182AEC0", VA = "0x18182C0C0")]
public static byte[] ReadSrpExtension(byte[] extensionData)
{
/*
An exception occurred when decompiling this method (0600B00F)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Tls.TlsSrpUtilities::ReadSrpExtension(System.Byte[])
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_1D:
stloc:ArgumentNullException(var_3_27, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("extensionData")))
}
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: 0x0600B010 RID: 45072 RVA: 0x00264568 File Offset: 0x00262768
[Token(Token = "0x600B010")]
[Address(RVA = "0x182C190", Offset = "0x182AF90", VA = "0x18182C190")]
public static BigInteger ReadSrpParameter(Stream input)
{
byte[] array = TlsUtilities.ReadOpaque16(input);
int length = array.Length;
BigInteger bigInteger;
bigInteger.nBits = (int)((ulong)(-1L));
int num = 0;
int[] array2 = BigInteger.MakeMagnitude(array, num, length);
bigInteger.magnitude = array2;
bool flag = array2.Length >= 1;
bigInteger.sign = (flag ? 1 : 0);
return bigInteger;
}
// Token: 0x0600B011 RID: 45073 RVA: 0x002645C0 File Offset: 0x002627C0
[Token(Token = "0x600B011")]
[Address(RVA = "0x182C290", Offset = "0x182B090", VA = "0x18182C290")]
public static void WriteSrpParameter(BigInteger x, Stream output)
{
TlsUtilities.WriteOpaque16(BigIntegers.AsUnsignedByteArray(x), output);
}
// Token: 0x0600B012 RID: 45074 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600B012")]
[Address(RVA = "0x182C0B0", Offset = "0x182AEB0", VA = "0x18182C0B0")]
public static bool IsSrpCipherSuite(int cipherSuite)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600B013 RID: 45075 RVA: 0x002645DC File Offset: 0x002627DC
[Token(Token = "0x600B013")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
protected TlsSrpUtilities()
{
}
}
}