This commit is contained in:
niko
2026-04-12 16:51:38 +02:00
parent 1b6f6d81d0
commit c12fbe3fc6
17828 changed files with 2994770 additions and 0 deletions
@@ -0,0 +1,105 @@
using System;
using System.IO;
using System.Text;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A29 RID: 6697
[Token(Token = "0x2001A29")]
public sealed class Base64
{
// Token: 0x06009D6F RID: 40303 RVA: 0x00206DB4 File Offset: 0x00204FB4
[Token(Token = "0x6009D6F")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
private Base64()
{
}
// Token: 0x06009D70 RID: 40304 RVA: 0x00206DC8 File Offset: 0x00204FC8
[Token(Token = "0x6009D70")]
[Address(RVA = "0x4DF6D0", Offset = "0x4DE6D0", VA = "0x1804DF6D0")]
public static string ToBase64String(byte[] data)
{
int length = data.Length;
int num = 0;
return Convert.ToBase64String(data, num, length);
}
// Token: 0x06009D71 RID: 40305 RVA: 0x00206DEC File Offset: 0x00204FEC
[Token(Token = "0x6009D71")]
[Address(RVA = "0x4DF660", Offset = "0x4DE660", VA = "0x1804DF660")]
public static string ToBase64String(byte[] data, int off, int length)
{
return Convert.ToBase64String(data, off, length);
}
// Token: 0x06009D72 RID: 40306 RVA: 0x00206E04 File Offset: 0x00205004
[Token(Token = "0x6009D72")]
[Address(RVA = "0x4DF4C0", Offset = "0x4DE4C0", VA = "0x1804DF4C0")]
public static byte[] Encode(byte[] data)
{
int length = data.Length;
int num = 0;
return Base64.Encode(data, num, length);
}
// Token: 0x06009D73 RID: 40307 RVA: 0x00206E28 File Offset: 0x00205028
[Token(Token = "0x6009D73")]
[Address(RVA = "0x4DF5C0", Offset = "0x4DE5C0", VA = "0x1804DF5C0")]
public static byte[] Encode(byte[] data, int off, int length)
{
string text = Convert.ToBase64String(data, off, length);
Encoding ascii = Encoding.ASCII;
throw new NullReferenceException();
}
// Token: 0x06009D74 RID: 40308 RVA: 0x00206E4C File Offset: 0x0020504C
[Token(Token = "0x6009D74")]
[Address(RVA = "0x4DF550", Offset = "0x4DE550", VA = "0x1804DF550")]
public static int Encode(byte[] data, Stream outStream)
{
int length = data.Length;
int num = 0;
byte[] array = Base64.Encode(data, num, length);
int num2 = outStream.ReadByte();
return array.Length;
}
// Token: 0x06009D75 RID: 40309 RVA: 0x00206E80 File Offset: 0x00205080
[Token(Token = "0x6009D75")]
[Address(RVA = "0x4DF4F0", Offset = "0x4DE4F0", VA = "0x1804DF4F0")]
public static int Encode(byte[] data, int off, int length, Stream outStream)
{
byte[] array = Base64.Encode(data, off, length);
int num = outStream.ReadByte();
return array.Length;
}
// Token: 0x06009D76 RID: 40310 RVA: 0x00206EAC File Offset: 0x002050AC
[Token(Token = "0x6009D76")]
[Address(RVA = "0x4DF330", Offset = "0x4DE330", VA = "0x1804DF330")]
public static byte[] Decode(byte[] data)
{
return Convert.FromBase64String(Encoding.ASCII.GetString(data));
}
// Token: 0x06009D77 RID: 40311 RVA: 0x00206ED4 File Offset: 0x002050D4
[Token(Token = "0x6009D77")]
[Address(RVA = "0x4DF460", Offset = "0x4DE460", VA = "0x1804DF460")]
public static byte[] Decode(string data)
{
return Convert.FromBase64String(data);
}
// Token: 0x06009D78 RID: 40312 RVA: 0x00206EE8 File Offset: 0x002050E8
[Token(Token = "0x6009D78")]
[Address(RVA = "0x4DF3C0", Offset = "0x4DE3C0", VA = "0x1804DF3C0")]
public static int Decode(string data, Stream outStream)
{
byte[] array = Convert.FromBase64String(data);
int num = outStream.ReadByte();
return array.Length;
}
}
}
@@ -0,0 +1,254 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A2A RID: 6698
[Token(Token = "0x2001A2A")]
public class Base64Encoder : IEncoder
{
// Token: 0x06009D79 RID: 40313 RVA: 0x00206F10 File Offset: 0x00205110
[Token(Token = "0x6009D79")]
[Address(RVA = "0x4DECA0", Offset = "0x4DDCA0", VA = "0x1804DECA0")]
protected void InitialiseDecodingTable()
{
int num = this.decodingTable.Length;
if (num > 0)
{
num--;
}
byte[] array = this.encodingTable;
int num2 = 0;
if (num2 < array.Length)
{
byte[] array2 = this.decodingTable;
num2++;
byte[] array3 = this.encodingTable;
}
}
// Token: 0x06009D7A RID: 40314 RVA: 0x00206F5C File Offset: 0x0020515C
[Token(Token = "0x6009D7A")]
[Address(RVA = "0x4DEDB0", Offset = "0x4DDDB0", VA = "0x1804DEDB0")]
public Base64Encoder()
{
byte[] array = new byte[64];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.0953DF544832295E4A5B19928F95C351F25DA86A).FieldHandle);
this.encodingTable = array;
this.padding = (byte)((ulong)61L);
byte[] array2 = new byte[128];
this.decodingTable = array2;
base..ctor();
this.InitialiseDecodingTable();
}
// Token: 0x06009D7B RID: 40315 RVA: 0x00206FAC File Offset: 0x002051AC
[Token(Token = "0x6009D7B")]
[Address(RVA = "0x4DE810", Offset = "0x4DD810", VA = "0x1804DE810", Slot = "4")]
public int Encode(byte[] data, int off, int length, Stream outStream)
{
int length2 = data.Length;
int num = off + 1;
byte b = data[num];
byte[] array = this.encodingTable;
byte[] array2 = this.encodingTable;
byte[] array3 = this.encodingTable;
byte[] array4 = this.encodingTable;
byte b2;
if (length != 0)
{
if (length == 0)
{
goto IL_70;
}
if (length == 1)
{
int length3 = data.Length;
byte[] array5 = this.encodingTable;
byte[] array6 = this.encodingTable;
byte[] array7 = this.encodingTable;
b2 = this.padding;
}
}
b2 += b2;
IL_70:
byte[] array8 = this.encodingTable;
byte[] array9 = this.encodingTable;
throw new NullReferenceException();
}
// Token: 0x06009D7C RID: 40316 RVA: 0x00207040 File Offset: 0x00205240
[Token(Token = "0x6009D7C")]
[Address(RVA = "0x4DF240", Offset = "0x4DE240", VA = "0x1804DF240")]
private bool ignore(char c)
{
return true;
}
// Token: 0x06009D7D RID: 40317 RVA: 0x00207050 File Offset: 0x00205250
[Token(Token = "0x6009D7D")]
[Address(RVA = "0x4DE300", Offset = "0x4DD300", VA = "0x1804DE300", Slot = "5")]
public int Decode(byte[] data, int off, int length, Stream outStream)
{
int num = 0;
if (off >= length || off == 250)
{
}
if (off < length)
{
byte[] array = this.decodingTable;
int length2 = data.Length;
int length3 = array.Length;
if (off >= length || off == 250)
{
}
if (off < length)
{
if (off == 250)
{
}
bool flag;
if (flag)
{
}
}
if (off < length)
{
if (off == 250)
{
}
bool flag2;
if (flag2)
{
}
}
num += 3;
if (off < length)
{
int length4 = data.Length;
if (off == 250)
{
}
if (off < length)
{
}
}
}
int length5 = data.Length;
int num2;
num2 += num;
return num2;
}
// Token: 0x06009D7E RID: 40318 RVA: 0x002070EC File Offset: 0x002052EC
[Token(Token = "0x6009D7E")]
[Address(RVA = "0x4DF260", Offset = "0x4DE260", VA = "0x1804DF260")]
private int nextI(byte[] data, int i, int finish)
{
if (i >= finish || i == 250)
{
}
return i;
}
// Token: 0x06009D7F RID: 40319 RVA: 0x0020710C File Offset: 0x0020530C
[Token(Token = "0x6009D7F")]
[Address(RVA = "0x4DDF40", Offset = "0x4DCF40", VA = "0x1804DDF40", Slot = "6")]
public int DecodeString(string data, Stream outStream)
{
int num = 0;
int num2 = data.m_stringLength;
uint num4;
if (num2 > 0)
{
int num3 = num2 - 1;
char c = data[num3];
if (num4 == data)
{
}
num2 = num3;
}
int num5 = 0;
int num6 = this.nextI(data, num5, (int)num4);
if (num6 < (int)num4)
{
byte[] array = this.decodingTable;
char c2 = data[num6];
int num7 = num6 + 1;
int num8 = this.nextI(data, num7, (int)num4);
byte[] array2 = this.decodingTable;
char c3 = data[num8];
int num9 = num8 + 1;
int num10 = this.nextI(data, num9, (int)num4);
byte[] array3 = this.decodingTable;
char c4 = data[num10];
int num11 = num10 + 1;
int num12 = this.nextI(data, num11, (int)num4);
byte[] array4 = this.decodingTable;
num10 = num12;
char c5 = data[num12];
int num13 = num10 + 1;
if (num13 < (int)num4)
{
char c6 = data[num13];
uint num14;
if (num14 == data)
{
}
num13++;
}
}
char c7 = data[(int)num4];
char c8 = data[(int)num4];
char c9 = data[(int)num4];
int num15 = num2 - 1;
char c10 = data[num15];
int num16;
num16 += num;
return num16;
}
// Token: 0x06009D80 RID: 40320 RVA: 0x0020723C File Offset: 0x0020543C
[Token(Token = "0x6009D80")]
[Address(RVA = "0x4DEE40", Offset = "0x4DDE40", VA = "0x1804DEE40")]
private int decodeLastBlock(Stream outStream, char c1, char c2, char c3, char c4)
{
byte b = this.padding;
byte[] array = this.decodingTable;
int length = array.Length;
return 3;
}
// Token: 0x06009D81 RID: 40321 RVA: 0x00207280 File Offset: 0x00205480
[Token(Token = "0x6009D81")]
[Address(RVA = "0x4DF2C0", Offset = "0x4DE2C0", VA = "0x1804DF2C0")]
private int nextI(string data, int i, int finish)
{
if (i < finish)
{
char c = data[i];
if ((uint)65530 == data)
{
}
}
return i;
}
// Token: 0x04006A39 RID: 27193
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A39")]
protected readonly byte[] encodingTable;
// Token: 0x04006A3A RID: 27194
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A3A")]
protected byte padding;
// Token: 0x04006A3B RID: 27195
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A3B")]
protected readonly byte[] decodingTable;
}
}
@@ -0,0 +1,102 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A2B RID: 6699
[Token(Token = "0x2001A2B")]
public class BufferedDecoder
{
// Token: 0x06009D82 RID: 40322 RVA: 0x002072AC File Offset: 0x002054AC
[Token(Token = "0x6009D82")]
[Address(RVA = "0x4E03D0", Offset = "0x4DF3D0", VA = "0x1804E03D0")]
public BufferedDecoder(ITranslator translator, int bufferSize)
{
/*
An exception occurred when decompiling this method (06009D82)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders.BufferedDecoder::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders.ITranslator,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2A:
stloc:ArgumentException(var_1_34, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("buffer size not multiple of input block size")))
}
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: 0x06009D83 RID: 40323 RVA: 0x002072F0 File Offset: 0x002054F0
[Token(Token = "0x6009D83")]
[Address(RVA = "0x4E0120", Offset = "0x4DF120", VA = "0x1804E0120")]
public int ProcessByte(byte input, byte[] output, int outOff)
{
int num = this.bufOff;
int num2 = 0;
byte[] array = this.buffer;
int num3 = num + 1;
this.bufOff = num3;
int length = this.buffer.Length;
if (this.bufOff == length)
{
ITranslator translator = this.translator;
this.bufOff = (int)((ulong)0L);
}
return num2;
}
// Token: 0x06009D84 RID: 40324 RVA: 0x00207348 File Offset: 0x00205548
[Token(Token = "0x6009D84")]
[Address(RVA = "0x4E0200", Offset = "0x4DF200", VA = "0x1804E0200")]
public int ProcessBytes(byte[] input, int inOff, int len, byte[] outBytes, int outOff)
{
byte[] array = this.buffer;
int num = 0;
int num2 = array.Length;
int num3 = this.bufOff;
num2 -= num3;
if (len > num2)
{
Array.Copy(input, inOff, array, num3, num2);
byte[] array2 = this.buffer;
ITranslator translator = this.translator;
int length = array2.Length;
byte[] array3 = this.buffer;
this.bufOff = num;
ITranslator translator2 = this.translator;
}
if (len != 0)
{
int num4 = this.bufOff;
byte[] array4 = this.buffer;
Array.Copy(input, inOff, array4, num4, len);
}
return num;
}
// Token: 0x04006A3C RID: 27196
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A3C")]
internal byte[] buffer;
// Token: 0x04006A3D RID: 27197
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A3D")]
internal int bufOff;
// Token: 0x04006A3E RID: 27198
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A3E")]
internal ITranslator translator;
}
}
@@ -0,0 +1,102 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A2C RID: 6700
[Token(Token = "0x2001A2C")]
public class BufferedEncoder
{
// Token: 0x06009D85 RID: 40325 RVA: 0x002073E0 File Offset: 0x002055E0
[Token(Token = "0x6009D85")]
[Address(RVA = "0x4E0740", Offset = "0x4DF740", VA = "0x1804E0740")]
public BufferedEncoder(ITranslator translator, int bufferSize)
{
/*
An exception occurred when decompiling this method (06009D85)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders.BufferedEncoder::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders.ITranslator,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2A:
stloc:ArgumentException(var_1_34, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("buffer size not multiple of input block size")))
}
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: 0x06009D86 RID: 40326 RVA: 0x00207424 File Offset: 0x00205624
[Token(Token = "0x6009D86")]
[Address(RVA = "0x4E0490", Offset = "0x4DF490", VA = "0x1804E0490")]
public int ProcessByte(byte input, byte[] outBytes, int outOff)
{
int num = this.bufOff;
int num2 = 0;
byte[] buffer = this.Buffer;
int num3 = num + 1;
this.bufOff = num3;
int length = this.Buffer.Length;
if (this.bufOff == length)
{
ITranslator translator = this.translator;
this.bufOff = (int)((ulong)0L);
}
return num2;
}
// Token: 0x06009D87 RID: 40327 RVA: 0x0020747C File Offset: 0x0020567C
[Token(Token = "0x6009D87")]
[Address(RVA = "0x4E0570", Offset = "0x4DF570", VA = "0x1804E0570")]
public int ProcessBytes(byte[] input, int inOff, int len, byte[] outBytes, int outOff)
{
byte[] buffer = this.Buffer;
int num = 0;
int num2 = buffer.Length;
int num3 = this.bufOff;
num2 -= num3;
if (len > num2)
{
Array.Copy(input, inOff, buffer, num3, num2);
byte[] buffer2 = this.Buffer;
ITranslator translator = this.translator;
int length = buffer2.Length;
byte[] buffer3 = this.Buffer;
this.bufOff = num;
ITranslator translator2 = this.translator;
}
if (len != 0)
{
int num4 = this.bufOff;
byte[] buffer4 = this.Buffer;
Array.Copy(input, inOff, buffer4, num4, len);
}
return num;
}
// Token: 0x04006A3F RID: 27199
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A3F")]
internal byte[] Buffer;
// Token: 0x04006A40 RID: 27200
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A40")]
internal int bufOff;
// Token: 0x04006A41 RID: 27201
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006A41")]
internal ITranslator translator;
}
}
@@ -0,0 +1,130 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A2D RID: 6701
[Token(Token = "0x2001A2D")]
public sealed class Hex
{
// Token: 0x06009D88 RID: 40328 RVA: 0x00207514 File Offset: 0x00205714
[Token(Token = "0x6009D88")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
private Hex()
{
}
// Token: 0x06009D89 RID: 40329 RVA: 0x00207528 File Offset: 0x00205728
[Token(Token = "0x6009D89")]
[Address(RVA = "0x4E8C00", Offset = "0x4E7C00", VA = "0x1804E8C00")]
public static string ToHexString(byte[] data)
{
int length = data.Length;
int num = 0;
byte[] array = Hex.Encode(data, num, length);
return Encoding.ASCII.GetString(array);
}
// Token: 0x06009D8A RID: 40330 RVA: 0x0020755C File Offset: 0x0020575C
[Token(Token = "0x6009D8A")]
[Address(RVA = "0x4E8CF0", Offset = "0x4E7CF0", VA = "0x1804E8CF0")]
public static string ToHexString(byte[] data, int off, int length)
{
byte[] array = Hex.Encode(data, off, length);
return Encoding.ASCII.GetString(array);
}
// Token: 0x06009D8B RID: 40331 RVA: 0x00207588 File Offset: 0x00205788
[Token(Token = "0x6009D8B")]
[Address(RVA = "0x4E8A40", Offset = "0x4E7A40", VA = "0x1804E8A40")]
public static byte[] Encode(byte[] data)
{
int length = data.Length;
int num = 0;
return Hex.Encode(data, num, length);
}
// Token: 0x06009D8C RID: 40332 RVA: 0x002075AC File Offset: 0x002057AC
[Token(Token = "0x6009D8C")]
[Address(RVA = "0x4E8960", Offset = "0x4E7960", VA = "0x1804E8960")]
public static byte[] Encode(byte[] data, int off, int length)
{
MemoryStream memoryStream = new MemoryStream(off);
((IDisposable)memoryStream).Dispose();
throw new NullReferenceException();
}
// Token: 0x06009D8D RID: 40333 RVA: 0x002075D0 File Offset: 0x002057D0
[Token(Token = "0x6009D8D")]
[Address(RVA = "0x4E8B60", Offset = "0x4E7B60", VA = "0x1804E8B60")]
public static int Encode(byte[] data, Stream outStream)
{
return data.Length;
}
// Token: 0x06009D8E RID: 40334 RVA: 0x002075EC File Offset: 0x002057EC
[Token(Token = "0x6009D8E")]
[Address(RVA = "0x4E8AB0", Offset = "0x4E7AB0", VA = "0x1804E8AB0")]
public static int Encode(byte[] data, int off, int length, Stream outStream)
{
throw new NullReferenceException();
}
// Token: 0x06009D8F RID: 40335 RVA: 0x00207600 File Offset: 0x00205800
[Token(Token = "0x6009D8F")]
[Address(RVA = "0x4E87F0", Offset = "0x4E77F0", VA = "0x1804E87F0")]
public static byte[] Decode(byte[] data)
{
int num;
MemoryStream memoryStream = new MemoryStream(num);
num = data.Length;
num++;
int length = data.Length;
((IDisposable)memoryStream).Dispose();
throw new NullReferenceException();
}
// Token: 0x06009D90 RID: 40336 RVA: 0x00207634 File Offset: 0x00205834
[Token(Token = "0x6009D90")]
[Address(RVA = "0x4E8710", Offset = "0x4E7710", VA = "0x1804E8710")]
public static byte[] Decode(string data)
{
int stringLength = data.m_stringLength;
int num;
MemoryStream memoryStream = new MemoryStream(num);
num = stringLength + 1;
((IDisposable)memoryStream).Dispose();
throw new NullReferenceException();
}
// Token: 0x06009D91 RID: 40337 RVA: 0x00207660 File Offset: 0x00205860
[Token(Token = "0x6009D91")]
[Address(RVA = "0x4E88D0", Offset = "0x4E78D0", VA = "0x1804E88D0")]
public static int Decode(string data, Stream outStream)
{
throw new NullReferenceException();
}
// Token: 0x06009D92 RID: 40338 RVA: 0x00207674 File Offset: 0x00205874
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009D92")]
[Address(RVA = "0x4E8DA0", Offset = "0x4E7DA0", VA = "0x1804E8DA0")]
static Hex()
{
byte[] array = new byte[16];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.FE5567E8D769550852182CDF69D74BB16DFF8E29).FieldHandle);
HexEncoder hexEncoder;
hexEncoder.encodingTable = array;
byte[] array2 = new byte[128];
hexEncoder.decodingTable = array2;
hexEncoder.InitialiseDecodingTable();
}
// Token: 0x04006A42 RID: 27202
[Token(Token = "0x4006A42")]
private static readonly IEncoder encoder;
}
}
@@ -0,0 +1,165 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A2E RID: 6702
[Token(Token = "0x2001A2E")]
public class HexEncoder : IEncoder
{
// Token: 0x06009D93 RID: 40339 RVA: 0x002076B4 File Offset: 0x002058B4
[Token(Token = "0x6009D93")]
[Address(RVA = "0x4E80A0", Offset = "0x4E70A0", VA = "0x1804E80A0")]
protected void InitialiseDecodingTable()
{
int num = this.decodingTable.Length;
if (num > 0)
{
num--;
}
byte[] array = this.encodingTable;
int num2 = 0;
if (num2 < array.Length)
{
byte[] array2 = this.decodingTable;
num2++;
byte[] array3 = this.encodingTable;
}
byte[] array4 = this.decodingTable;
byte b = array4[12];
array4[8] = b;
byte[] array5 = this.decodingTable;
byte b2 = array5[12];
array5[8] = b2;
byte[] array6 = this.decodingTable;
byte b3 = array6[12];
array6[8] = b3;
byte[] array7 = this.decodingTable;
byte b4 = array7[12];
array7[8] = b4;
byte[] array8 = this.decodingTable;
byte b5 = array8[12];
array8[8] = b5;
byte[] array9 = this.decodingTable;
byte b6 = array9[12];
array9[8] = b6;
}
// Token: 0x06009D94 RID: 40340 RVA: 0x002077B0 File Offset: 0x002059B0
[Token(Token = "0x6009D94")]
[Address(RVA = "0x4E8310", Offset = "0x4E7310", VA = "0x1804E8310")]
public HexEncoder()
{
byte[] array = new byte[16];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.FE5567E8D769550852182CDF69D74BB16DFF8E29).FieldHandle);
this.encodingTable = array;
byte[] array2 = new byte[128];
this.decodingTable = array2;
base..ctor();
this.InitialiseDecodingTable();
}
// Token: 0x06009D95 RID: 40341 RVA: 0x002077F8 File Offset: 0x002059F8
[Token(Token = "0x6009D95")]
[Address(RVA = "0x4E7F60", Offset = "0x4E6F60", VA = "0x1804E7F60", Slot = "4")]
public int Encode(byte[] data, int off, int length, Stream outStream)
{
byte[] array = this.encodingTable;
byte[] array2 = this.encodingTable;
return off;
}
// Token: 0x06009D96 RID: 40342 RVA: 0x0020781C File Offset: 0x00205A1C
[Token(Token = "0x6009D96")]
[Address(RVA = "0x4E8080", Offset = "0x4E7080", VA = "0x1804E8080")]
private static bool Ignore(char c)
{
return true;
}
// Token: 0x06009D97 RID: 40343 RVA: 0x0020782C File Offset: 0x00205A2C
[Token(Token = "0x6009D97")]
[Address(RVA = "0x4E7D10", Offset = "0x4E6D10", VA = "0x1804E7D10", Slot = "5")]
public int Decode(byte[] data, int off, int length, Stream outStream)
{
int num = 0;
if (off < length)
{
if (length == 250)
{
}
if (off < length)
{
if (length == 250)
{
}
byte[] array = this.decodingTable;
int length2 = data.Length;
int length3 = array.Length;
if (off >= length || length == 250)
{
}
num++;
}
}
return num;
}
// Token: 0x06009D98 RID: 40344 RVA: 0x00207890 File Offset: 0x00205A90
[Token(Token = "0x6009D98")]
[Address(RVA = "0x4E7B00", Offset = "0x4E6B00", VA = "0x1804E7B00", Slot = "6")]
public int DecodeString(string data, Stream outStream)
{
int num = 0;
int num2 = data.m_stringLength;
if (num2 > 0)
{
int num3 = num2 - 1;
char c = data[num3];
if ((uint)65530 == (uint)c)
{
}
num2 = num3;
}
if (num2 > 0)
{
if (num < num2)
{
char c2 = data[num];
if ((uint)65530 == (uint)c2)
{
}
num++;
}
byte[] array = this.decodingTable;
num++;
char c3 = data[num];
if (num < num2)
{
char c4 = data[num];
if ((uint)65530 == (uint)c4)
{
}
num++;
}
byte[] array2 = this.decodingTable;
num++;
char c5 = data[num];
num++;
}
return num;
}
// Token: 0x04006A43 RID: 27203
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006A43")]
protected readonly byte[] encodingTable;
// Token: 0x04006A44 RID: 27204
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006A44")]
protected readonly byte[] decodingTable;
}
}
@@ -0,0 +1,74 @@
using System;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A2F RID: 6703
[Token(Token = "0x2001A2F")]
public class HexTranslator : ITranslator
{
// Token: 0x06009D99 RID: 40345 RVA: 0x0020793C File Offset: 0x00205B3C
[Token(Token = "0x6009D99")]
[Address(RVA = "0x4E86A0", Offset = "0x4E76A0", VA = "0x1804E86A0", Slot = "4")]
public int GetEncodedBlockSize()
{
return 2;
}
// Token: 0x06009D9A RID: 40346 RVA: 0x0020794C File Offset: 0x00205B4C
[Token(Token = "0x6009D9A")]
[Address(RVA = "0x4E84E0", Offset = "0x4E74E0", VA = "0x1804E84E0", Slot = "5")]
public int Encode(byte[] input, int inOff, int length, byte[] outBytes, int outOff)
{
int num = 0;
if (length > 0)
{
num++;
}
throw new NullReferenceException();
}
// Token: 0x06009D9B RID: 40347 RVA: 0x00207968 File Offset: 0x00205B68
[Token(Token = "0x6009D9B")]
[Address(RVA = "0x4E8690", Offset = "0x4E7690", VA = "0x1804E8690", Slot = "6")]
public int GetDecodedBlockSize()
{
return 1;
}
// Token: 0x06009D9C RID: 40348 RVA: 0x00207978 File Offset: 0x00205B78
[Token(Token = "0x6009D9C")]
[Address(RVA = "0x4E83A0", Offset = "0x4E73A0", VA = "0x1804E83A0", Slot = "7")]
public int Decode(byte[] input, int inOff, int length, byte[] outBytes, int outOff)
{
int num = 0;
if (length > 0)
{
int length2 = input.Length;
num++;
}
return length;
}
// Token: 0x06009D9D RID: 40349 RVA: 0x002079A0 File Offset: 0x00205BA0
[Token(Token = "0x6009D9D")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
public HexTranslator()
{
}
// Token: 0x06009D9E RID: 40350 RVA: 0x002079B4 File Offset: 0x00205BB4
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009D9E")]
[Address(RVA = "0x4E86B0", Offset = "0x4E76B0", VA = "0x1804E86B0")]
static HexTranslator()
{
RuntimeHelpers.InitializeArray(new byte[16], fieldof(<PrivateImplementationDetails>.FE5567E8D769550852182CDF69D74BB16DFF8E29).FieldHandle);
}
// Token: 0x04006A45 RID: 27205
[Token(Token = "0x4006A45")]
private static readonly byte[] hexTable;
}
}
@@ -0,0 +1,26 @@
using System;
using System.IO;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A30 RID: 6704
[Token(Token = "0x2001A30")]
public interface IEncoder
{
// Token: 0x06009D9F RID: 40351
[Token(Token = "0x6009D9F")]
[Address(Slot = "0")]
int Encode(byte[] data, int off, int length, Stream outStream);
// Token: 0x06009DA0 RID: 40352
[Token(Token = "0x6009DA0")]
[Address(Slot = "1")]
int Decode(byte[] data, int off, int length, Stream outStream);
// Token: 0x06009DA1 RID: 40353
[Token(Token = "0x6009DA1")]
[Address(Slot = "2")]
int DecodeString(string data, Stream outStream);
}
}
@@ -0,0 +1,30 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A31 RID: 6705
[Token(Token = "0x2001A31")]
public interface ITranslator
{
// Token: 0x06009DA2 RID: 40354
[Token(Token = "0x6009DA2")]
[Address(Slot = "0")]
int GetEncodedBlockSize();
// Token: 0x06009DA3 RID: 40355
[Token(Token = "0x6009DA3")]
[Address(Slot = "1")]
int Encode(byte[] input, int inOff, int length, byte[] outBytes, int outOff);
// Token: 0x06009DA4 RID: 40356
[Token(Token = "0x6009DA4")]
[Address(Slot = "2")]
int GetDecodedBlockSize();
// Token: 0x06009DA5 RID: 40357
[Token(Token = "0x6009DA5")]
[Address(Slot = "3")]
int Decode(byte[] input, int inOff, int length, byte[] outBytes, int outOff);
}
}
@@ -0,0 +1,97 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A32 RID: 6706
[Token(Token = "0x2001A32")]
public class UrlBase64
{
// Token: 0x06009DA6 RID: 40358 RVA: 0x002079D4 File Offset: 0x00205BD4
[Token(Token = "0x6009DA6")]
[Address(RVA = "0x4F5300", Offset = "0x4F4300", VA = "0x1804F5300")]
public static byte[] Encode(byte[] data)
{
MemoryStream memoryStream = new MemoryStream();
int length = data.Length;
throw new NullReferenceException();
}
// Token: 0x06009DA7 RID: 40359 RVA: 0x00207A00 File Offset: 0x00205C00
[Token(Token = "0x6009DA7")]
[Address(RVA = "0x4F5260", Offset = "0x4F4260", VA = "0x1804F5260")]
public static int Encode(byte[] data, Stream outStr)
{
return data.Length;
}
// Token: 0x06009DA8 RID: 40360 RVA: 0x00207A1C File Offset: 0x00205C1C
[Token(Token = "0x6009DA8")]
[Address(RVA = "0x4F4FD0", Offset = "0x4F3FD0", VA = "0x1804F4FD0")]
public static byte[] Decode(byte[] data)
{
MemoryStream memoryStream = new MemoryStream();
int length = data.Length;
throw new NullReferenceException();
}
// Token: 0x06009DA9 RID: 40361 RVA: 0x00207A48 File Offset: 0x00205C48
[Token(Token = "0x6009DA9")]
[Address(RVA = "0x4F5130", Offset = "0x4F4130", VA = "0x1804F5130")]
public static int Decode(byte[] data, Stream outStr)
{
return data.Length;
}
// Token: 0x06009DAA RID: 40362 RVA: 0x00207A64 File Offset: 0x00205C64
[Token(Token = "0x6009DAA")]
[Address(RVA = "0x4F4E80", Offset = "0x4F3E80", VA = "0x1804F4E80")]
public static byte[] Decode(string data)
{
MemoryStream memoryStream = new MemoryStream();
throw new NullReferenceException();
}
// Token: 0x06009DAB RID: 40363 RVA: 0x00207A88 File Offset: 0x00205C88
[Token(Token = "0x6009DAB")]
[Address(RVA = "0x4F51D0", Offset = "0x4F41D0", VA = "0x1804F51D0")]
public static int Decode(string data, Stream outStr)
{
throw new NullReferenceException();
}
// Token: 0x06009DAC RID: 40364 RVA: 0x00207A9C File Offset: 0x00205C9C
[Token(Token = "0x6009DAC")]
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
public UrlBase64()
{
}
// Token: 0x06009DAD RID: 40365 RVA: 0x00207AB0 File Offset: 0x00205CB0
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009DAD")]
[Address(RVA = "0x4F5460", Offset = "0x4F4460", VA = "0x1804F5460")]
static UrlBase64()
{
byte[] array = new byte[64];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.0953DF544832295E4A5B19928F95C351F25DA86A).FieldHandle);
UrlBase64Encoder urlBase64Encoder;
urlBase64Encoder.encodingTable = array;
urlBase64Encoder.padding = (byte)((ulong)61L);
byte[] array2 = new byte[128];
urlBase64Encoder.decodingTable = array2;
urlBase64Encoder.InitialiseDecodingTable();
int length = urlBase64Encoder.encodingTable.Length;
urlBase64Encoder.decodingTable = (ulong)45L;
int num = urlBase64Encoder.encodingTable.Length - 1;
urlBase64Encoder.padding = (byte)((ulong)46L);
urlBase64Encoder.InitialiseDecodingTable();
}
// Token: 0x04006A46 RID: 27206
[Token(Token = "0x4006A46")]
private static readonly IEncoder encoder;
}
}
@@ -0,0 +1,31 @@
using System;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x02001A33 RID: 6707
[Token(Token = "0x2001A33")]
public class UrlBase64Encoder : Base64Encoder
{
// Token: 0x06009DAE RID: 40366 RVA: 0x00207B34 File Offset: 0x00205D34
[Token(Token = "0x6009DAE")]
[Address(RVA = "0x4F4D80", Offset = "0x4F3D80", VA = "0x1804F4D80")]
public UrlBase64Encoder()
{
byte[] array = new byte[64];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.0953DF544832295E4A5B19928F95C351F25DA86A).FieldHandle);
this.encodingTable = array;
this.padding = (byte)((ulong)61L);
byte[] array2 = new byte[128];
this.decodingTable = array2;
base..ctor();
base.InitialiseDecodingTable();
int length = this.encodingTable.Length;
this.decodingTable = (ulong)45L;
int num = this.encodingTable.Length - 1;
this.padding = (byte)((ulong)46L);
base.InitialiseDecodingTable();
}
}
}