oh dear
This commit is contained in:
+105
@@ -0,0 +1,105 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x02001949 RID: 6473
|
||||
[Token(Token = "0x2001949")]
|
||||
public sealed class Base64
|
||||
{
|
||||
// Token: 0x060099A1 RID: 39329 RVA: 0x001FDD1C File Offset: 0x001FBF1C
|
||||
[Token(Token = "0x60099A1")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
private Base64()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060099A2 RID: 39330 RVA: 0x001FDD30 File Offset: 0x001FBF30
|
||||
[Token(Token = "0x60099A2")]
|
||||
[Address(RVA = "0x18D5B80", Offset = "0x18D4980", VA = "0x1818D5B80")]
|
||||
public static string ToBase64String(byte[] data)
|
||||
{
|
||||
int length = data.Length;
|
||||
int num = 0;
|
||||
return Convert.ToBase64String(data, num, length);
|
||||
}
|
||||
|
||||
// Token: 0x060099A3 RID: 39331 RVA: 0x001FDD54 File Offset: 0x001FBF54
|
||||
[Token(Token = "0x60099A3")]
|
||||
[Address(RVA = "0x18D5B10", Offset = "0x18D4910", VA = "0x1818D5B10")]
|
||||
public static string ToBase64String(byte[] data, int off, int length)
|
||||
{
|
||||
return Convert.ToBase64String(data, off, length);
|
||||
}
|
||||
|
||||
// Token: 0x060099A4 RID: 39332 RVA: 0x001FDD6C File Offset: 0x001FBF6C
|
||||
[Token(Token = "0x60099A4")]
|
||||
[Address(RVA = "0x18D5970", Offset = "0x18D4770", VA = "0x1818D5970")]
|
||||
public static byte[] Encode(byte[] data)
|
||||
{
|
||||
int length = data.Length;
|
||||
int num = 0;
|
||||
return Base64.Encode(data, num, length);
|
||||
}
|
||||
|
||||
// Token: 0x060099A5 RID: 39333 RVA: 0x001FDD90 File Offset: 0x001FBF90
|
||||
[Token(Token = "0x60099A5")]
|
||||
[Address(RVA = "0x18D5A70", Offset = "0x18D4870", VA = "0x1818D5A70")]
|
||||
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: 0x060099A6 RID: 39334 RVA: 0x001FDDB4 File Offset: 0x001FBFB4
|
||||
[Token(Token = "0x60099A6")]
|
||||
[Address(RVA = "0x18D5A00", Offset = "0x18D4800", VA = "0x1818D5A00")]
|
||||
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: 0x060099A7 RID: 39335 RVA: 0x001FDDE8 File Offset: 0x001FBFE8
|
||||
[Token(Token = "0x60099A7")]
|
||||
[Address(RVA = "0x18D59A0", Offset = "0x18D47A0", VA = "0x1818D59A0")]
|
||||
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: 0x060099A8 RID: 39336 RVA: 0x001FDE14 File Offset: 0x001FC014
|
||||
[Token(Token = "0x60099A8")]
|
||||
[Address(RVA = "0x18D57E0", Offset = "0x18D45E0", VA = "0x1818D57E0")]
|
||||
public static byte[] Decode(byte[] data)
|
||||
{
|
||||
return Convert.FromBase64String(Encoding.ASCII.GetString(data));
|
||||
}
|
||||
|
||||
// Token: 0x060099A9 RID: 39337 RVA: 0x001FDE3C File Offset: 0x001FC03C
|
||||
[Token(Token = "0x60099A9")]
|
||||
[Address(RVA = "0x18D5910", Offset = "0x18D4710", VA = "0x1818D5910")]
|
||||
public static byte[] Decode(string data)
|
||||
{
|
||||
return Convert.FromBase64String(data);
|
||||
}
|
||||
|
||||
// Token: 0x060099AA RID: 39338 RVA: 0x001FDE50 File Offset: 0x001FC050
|
||||
[Token(Token = "0x60099AA")]
|
||||
[Address(RVA = "0x18D5870", Offset = "0x18D4670", VA = "0x1818D5870")]
|
||||
public static int Decode(string data, Stream outStream)
|
||||
{
|
||||
byte[] array = Convert.FromBase64String(data);
|
||||
int num = outStream.ReadByte();
|
||||
return array.Length;
|
||||
}
|
||||
}
|
||||
}
|
||||
+254
@@ -0,0 +1,254 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x0200194A RID: 6474
|
||||
[Token(Token = "0x200194A")]
|
||||
public class Base64Encoder : IEncoder
|
||||
{
|
||||
// Token: 0x060099AB RID: 39339 RVA: 0x001FDE78 File Offset: 0x001FC078
|
||||
[Token(Token = "0x60099AB")]
|
||||
[Address(RVA = "0x18D5150", Offset = "0x18D3F50", VA = "0x1818D5150")]
|
||||
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: 0x060099AC RID: 39340 RVA: 0x001FDEC4 File Offset: 0x001FC0C4
|
||||
[Token(Token = "0x60099AC")]
|
||||
[Address(RVA = "0x18D5260", Offset = "0x18D4060", VA = "0x1818D5260")]
|
||||
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: 0x060099AD RID: 39341 RVA: 0x001FDF14 File Offset: 0x001FC114
|
||||
[Token(Token = "0x60099AD")]
|
||||
[Address(RVA = "0x18D4CC0", Offset = "0x18D3AC0", VA = "0x1818D4CC0", 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: 0x060099AE RID: 39342 RVA: 0x001FDFA8 File Offset: 0x001FC1A8
|
||||
[Token(Token = "0x60099AE")]
|
||||
[Address(RVA = "0x18D56F0", Offset = "0x18D44F0", VA = "0x1818D56F0")]
|
||||
private bool ignore(char c)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x060099AF RID: 39343 RVA: 0x001FDFB8 File Offset: 0x001FC1B8
|
||||
[Token(Token = "0x60099AF")]
|
||||
[Address(RVA = "0x18D47B0", Offset = "0x18D35B0", VA = "0x1818D47B0", 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: 0x060099B0 RID: 39344 RVA: 0x001FE054 File Offset: 0x001FC254
|
||||
[Token(Token = "0x60099B0")]
|
||||
[Address(RVA = "0x18D5710", Offset = "0x18D4510", VA = "0x1818D5710")]
|
||||
private int nextI(byte[] data, int i, int finish)
|
||||
{
|
||||
if (i >= finish || i == 250)
|
||||
{
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
// Token: 0x060099B1 RID: 39345 RVA: 0x001FE074 File Offset: 0x001FC274
|
||||
[Token(Token = "0x60099B1")]
|
||||
[Address(RVA = "0x18D43F0", Offset = "0x18D31F0", VA = "0x1818D43F0", 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: 0x060099B2 RID: 39346 RVA: 0x001FE1A4 File Offset: 0x001FC3A4
|
||||
[Token(Token = "0x60099B2")]
|
||||
[Address(RVA = "0x18D52F0", Offset = "0x18D40F0", VA = "0x1818D52F0")]
|
||||
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: 0x060099B3 RID: 39347 RVA: 0x001FE1E8 File Offset: 0x001FC3E8
|
||||
[Token(Token = "0x60099B3")]
|
||||
[Address(RVA = "0x18D5770", Offset = "0x18D4570", VA = "0x1818D5770")]
|
||||
private int nextI(string data, int i, int finish)
|
||||
{
|
||||
if (i < finish)
|
||||
{
|
||||
char c = data[i];
|
||||
if ((uint)65530 == data)
|
||||
{
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
// Token: 0x04006880 RID: 26752
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006880")]
|
||||
protected readonly byte[] encodingTable;
|
||||
|
||||
// Token: 0x04006881 RID: 26753
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006881")]
|
||||
protected byte padding;
|
||||
|
||||
// Token: 0x04006882 RID: 26754
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006882")]
|
||||
protected readonly byte[] decodingTable;
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x0200194B RID: 6475
|
||||
[Token(Token = "0x200194B")]
|
||||
public class BufferedDecoder
|
||||
{
|
||||
// Token: 0x060099B4 RID: 39348 RVA: 0x001FE214 File Offset: 0x001FC414
|
||||
[Token(Token = "0x60099B4")]
|
||||
[Address(RVA = "0x18D68C0", Offset = "0x18D56C0", VA = "0x1818D68C0")]
|
||||
public BufferedDecoder(ITranslator translator, int bufferSize)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099B4)
|
||||
|
||||
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: 0x060099B5 RID: 39349 RVA: 0x001FE258 File Offset: 0x001FC458
|
||||
[Token(Token = "0x60099B5")]
|
||||
[Address(RVA = "0x18D6610", Offset = "0x18D5410", VA = "0x1818D6610")]
|
||||
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: 0x060099B6 RID: 39350 RVA: 0x001FE2B0 File Offset: 0x001FC4B0
|
||||
[Token(Token = "0x60099B6")]
|
||||
[Address(RVA = "0x18D66F0", Offset = "0x18D54F0", VA = "0x1818D66F0")]
|
||||
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: 0x04006883 RID: 26755
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006883")]
|
||||
internal byte[] buffer;
|
||||
|
||||
// Token: 0x04006884 RID: 26756
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006884")]
|
||||
internal int bufOff;
|
||||
|
||||
// Token: 0x04006885 RID: 26757
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006885")]
|
||||
internal ITranslator translator;
|
||||
}
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x0200194C RID: 6476
|
||||
[Token(Token = "0x200194C")]
|
||||
public class BufferedEncoder
|
||||
{
|
||||
// Token: 0x060099B7 RID: 39351 RVA: 0x001FE348 File Offset: 0x001FC548
|
||||
[Token(Token = "0x60099B7")]
|
||||
[Address(RVA = "0x18D6C30", Offset = "0x18D5A30", VA = "0x1818D6C30")]
|
||||
public BufferedEncoder(ITranslator translator, int bufferSize)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (060099B7)
|
||||
|
||||
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: 0x060099B8 RID: 39352 RVA: 0x001FE38C File Offset: 0x001FC58C
|
||||
[Token(Token = "0x60099B8")]
|
||||
[Address(RVA = "0x18D6980", Offset = "0x18D5780", VA = "0x1818D6980")]
|
||||
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: 0x060099B9 RID: 39353 RVA: 0x001FE3E4 File Offset: 0x001FC5E4
|
||||
[Token(Token = "0x60099B9")]
|
||||
[Address(RVA = "0x18D6A60", Offset = "0x18D5860", VA = "0x1818D6A60")]
|
||||
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: 0x04006886 RID: 26758
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4006886")]
|
||||
internal byte[] Buffer;
|
||||
|
||||
// Token: 0x04006887 RID: 26759
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4006887")]
|
||||
internal int bufOff;
|
||||
|
||||
// Token: 0x04006888 RID: 26760
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x4006888")]
|
||||
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: 0x0200194D RID: 6477
|
||||
[Token(Token = "0x200194D")]
|
||||
public sealed class Hex
|
||||
{
|
||||
// Token: 0x060099BA RID: 39354 RVA: 0x001FE47C File Offset: 0x001FC67C
|
||||
[Token(Token = "0x60099BA")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
private Hex()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060099BB RID: 39355 RVA: 0x001FE490 File Offset: 0x001FC690
|
||||
[Token(Token = "0x60099BB")]
|
||||
[Address(RVA = "0x18DF0D0", Offset = "0x18DDED0", VA = "0x1818DF0D0")]
|
||||
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: 0x060099BC RID: 39356 RVA: 0x001FE4C4 File Offset: 0x001FC6C4
|
||||
[Token(Token = "0x60099BC")]
|
||||
[Address(RVA = "0x18DF1C0", Offset = "0x18DDFC0", VA = "0x1818DF1C0")]
|
||||
public static string ToHexString(byte[] data, int off, int length)
|
||||
{
|
||||
byte[] array = Hex.Encode(data, off, length);
|
||||
return Encoding.ASCII.GetString(array);
|
||||
}
|
||||
|
||||
// Token: 0x060099BD RID: 39357 RVA: 0x001FE4F0 File Offset: 0x001FC6F0
|
||||
[Token(Token = "0x60099BD")]
|
||||
[Address(RVA = "0x18DEF10", Offset = "0x18DDD10", VA = "0x1818DEF10")]
|
||||
public static byte[] Encode(byte[] data)
|
||||
{
|
||||
int length = data.Length;
|
||||
int num = 0;
|
||||
return Hex.Encode(data, num, length);
|
||||
}
|
||||
|
||||
// Token: 0x060099BE RID: 39358 RVA: 0x001FE514 File Offset: 0x001FC714
|
||||
[Token(Token = "0x60099BE")]
|
||||
[Address(RVA = "0x18DEE30", Offset = "0x18DDC30", VA = "0x1818DEE30")]
|
||||
public static byte[] Encode(byte[] data, int off, int length)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream(off);
|
||||
((IDisposable)memoryStream).Dispose();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099BF RID: 39359 RVA: 0x001FE538 File Offset: 0x001FC738
|
||||
[Token(Token = "0x60099BF")]
|
||||
[Address(RVA = "0x18DF030", Offset = "0x18DDE30", VA = "0x1818DF030")]
|
||||
public static int Encode(byte[] data, Stream outStream)
|
||||
{
|
||||
return data.Length;
|
||||
}
|
||||
|
||||
// Token: 0x060099C0 RID: 39360 RVA: 0x001FE554 File Offset: 0x001FC754
|
||||
[Token(Token = "0x60099C0")]
|
||||
[Address(RVA = "0x18DEF80", Offset = "0x18DDD80", VA = "0x1818DEF80")]
|
||||
public static int Encode(byte[] data, int off, int length, Stream outStream)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099C1 RID: 39361 RVA: 0x001FE568 File Offset: 0x001FC768
|
||||
[Token(Token = "0x60099C1")]
|
||||
[Address(RVA = "0x18DECC0", Offset = "0x18DDAC0", VA = "0x1818DECC0")]
|
||||
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: 0x060099C2 RID: 39362 RVA: 0x001FE59C File Offset: 0x001FC79C
|
||||
[Token(Token = "0x60099C2")]
|
||||
[Address(RVA = "0x18DEBE0", Offset = "0x18DD9E0", VA = "0x1818DEBE0")]
|
||||
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: 0x060099C3 RID: 39363 RVA: 0x001FE5C8 File Offset: 0x001FC7C8
|
||||
[Token(Token = "0x60099C3")]
|
||||
[Address(RVA = "0x18DEDA0", Offset = "0x18DDBA0", VA = "0x1818DEDA0")]
|
||||
public static int Decode(string data, Stream outStream)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099C4 RID: 39364 RVA: 0x001FE5DC File Offset: 0x001FC7DC
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x60099C4")]
|
||||
[Address(RVA = "0x18DF270", Offset = "0x18DE070", VA = "0x1818DF270")]
|
||||
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: 0x04006889 RID: 26761
|
||||
[Token(Token = "0x4006889")]
|
||||
private static readonly IEncoder encoder;
|
||||
}
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x0200194E RID: 6478
|
||||
[Token(Token = "0x200194E")]
|
||||
public class HexEncoder : IEncoder
|
||||
{
|
||||
// Token: 0x060099C5 RID: 39365 RVA: 0x001FE61C File Offset: 0x001FC81C
|
||||
[Token(Token = "0x60099C5")]
|
||||
[Address(RVA = "0x18DE590", Offset = "0x18DD390", VA = "0x1818DE590")]
|
||||
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: 0x060099C6 RID: 39366 RVA: 0x001FE718 File Offset: 0x001FC918
|
||||
[Token(Token = "0x60099C6")]
|
||||
[Address(RVA = "0x18DE800", Offset = "0x18DD600", VA = "0x1818DE800")]
|
||||
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: 0x060099C7 RID: 39367 RVA: 0x001FE760 File Offset: 0x001FC960
|
||||
[Token(Token = "0x60099C7")]
|
||||
[Address(RVA = "0x18DE450", Offset = "0x18DD250", VA = "0x1818DE450", Slot = "4")]
|
||||
public int Encode(byte[] data, int off, int length, Stream outStream)
|
||||
{
|
||||
byte[] array = this.encodingTable;
|
||||
byte[] array2 = this.encodingTable;
|
||||
return off;
|
||||
}
|
||||
|
||||
// Token: 0x060099C8 RID: 39368 RVA: 0x001FE784 File Offset: 0x001FC984
|
||||
[Token(Token = "0x60099C8")]
|
||||
[Address(RVA = "0x18DE570", Offset = "0x18DD370", VA = "0x1818DE570")]
|
||||
private static bool Ignore(char c)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// Token: 0x060099C9 RID: 39369 RVA: 0x001FE794 File Offset: 0x001FC994
|
||||
[Token(Token = "0x60099C9")]
|
||||
[Address(RVA = "0x18DE200", Offset = "0x18DD000", VA = "0x1818DE200", 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: 0x060099CA RID: 39370 RVA: 0x001FE7F8 File Offset: 0x001FC9F8
|
||||
[Token(Token = "0x60099CA")]
|
||||
[Address(RVA = "0x18DDFF0", Offset = "0x18DCDF0", VA = "0x1818DDFF0", 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: 0x0400688A RID: 26762
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x400688A")]
|
||||
protected readonly byte[] encodingTable;
|
||||
|
||||
// Token: 0x0400688B RID: 26763
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x400688B")]
|
||||
protected readonly byte[] decodingTable;
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x0200194F RID: 6479
|
||||
[Token(Token = "0x200194F")]
|
||||
public class HexTranslator : ITranslator
|
||||
{
|
||||
// Token: 0x060099CB RID: 39371 RVA: 0x001FE8A4 File Offset: 0x001FCAA4
|
||||
[Token(Token = "0x60099CB")]
|
||||
[Address(RVA = "0x460DB0", Offset = "0x45FBB0", VA = "0x180460DB0", Slot = "4")]
|
||||
public int GetEncodedBlockSize()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
// Token: 0x060099CC RID: 39372 RVA: 0x001FE8B4 File Offset: 0x001FCAB4
|
||||
[Token(Token = "0x60099CC")]
|
||||
[Address(RVA = "0x18DE9D0", Offset = "0x18DD7D0", VA = "0x1818DE9D0", 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: 0x060099CD RID: 39373 RVA: 0x001FE8D0 File Offset: 0x001FCAD0
|
||||
[Token(Token = "0x60099CD")]
|
||||
[Address(RVA = "0x4100E0", Offset = "0x40EEE0", VA = "0x1804100E0", Slot = "6")]
|
||||
public int GetDecodedBlockSize()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Token: 0x060099CE RID: 39374 RVA: 0x001FE8E0 File Offset: 0x001FCAE0
|
||||
[Token(Token = "0x60099CE")]
|
||||
[Address(RVA = "0x18DE890", Offset = "0x18DD690", VA = "0x1818DE890", 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: 0x060099CF RID: 39375 RVA: 0x001FE908 File Offset: 0x001FCB08
|
||||
[Token(Token = "0x60099CF")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public HexTranslator()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060099D0 RID: 39376 RVA: 0x001FE91C File Offset: 0x001FCB1C
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x60099D0")]
|
||||
[Address(RVA = "0x18DEB80", Offset = "0x18DD980", VA = "0x1818DEB80")]
|
||||
static HexTranslator()
|
||||
{
|
||||
RuntimeHelpers.InitializeArray(new byte[16], fieldof(<PrivateImplementationDetails>.FE5567E8D769550852182CDF69D74BB16DFF8E29).FieldHandle);
|
||||
}
|
||||
|
||||
// Token: 0x0400688C RID: 26764
|
||||
[Token(Token = "0x400688C")]
|
||||
private static readonly byte[] hexTable;
|
||||
}
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x02001950 RID: 6480
|
||||
[Token(Token = "0x2001950")]
|
||||
public interface IEncoder
|
||||
{
|
||||
// Token: 0x060099D1 RID: 39377
|
||||
[Token(Token = "0x60099D1")]
|
||||
[Address(Slot = "0")]
|
||||
int Encode(byte[] data, int off, int length, Stream outStream);
|
||||
|
||||
// Token: 0x060099D2 RID: 39378
|
||||
[Token(Token = "0x60099D2")]
|
||||
[Address(Slot = "1")]
|
||||
int Decode(byte[] data, int off, int length, Stream outStream);
|
||||
|
||||
// Token: 0x060099D3 RID: 39379
|
||||
[Token(Token = "0x60099D3")]
|
||||
[Address(Slot = "2")]
|
||||
int DecodeString(string data, Stream outStream);
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x02001951 RID: 6481
|
||||
[Token(Token = "0x2001951")]
|
||||
public interface ITranslator
|
||||
{
|
||||
// Token: 0x060099D4 RID: 39380
|
||||
[Token(Token = "0x60099D4")]
|
||||
[Address(Slot = "0")]
|
||||
int GetEncodedBlockSize();
|
||||
|
||||
// Token: 0x060099D5 RID: 39381
|
||||
[Token(Token = "0x60099D5")]
|
||||
[Address(Slot = "1")]
|
||||
int Encode(byte[] input, int inOff, int length, byte[] outBytes, int outOff);
|
||||
|
||||
// Token: 0x060099D6 RID: 39382
|
||||
[Token(Token = "0x60099D6")]
|
||||
[Address(Slot = "2")]
|
||||
int GetDecodedBlockSize();
|
||||
|
||||
// Token: 0x060099D7 RID: 39383
|
||||
[Token(Token = "0x60099D7")]
|
||||
[Address(Slot = "3")]
|
||||
int Decode(byte[] input, int inOff, int length, byte[] outBytes, int outOff);
|
||||
}
|
||||
}
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x02001952 RID: 6482
|
||||
[Token(Token = "0x2001952")]
|
||||
public class UrlBase64
|
||||
{
|
||||
// Token: 0x060099D8 RID: 39384 RVA: 0x001FE93C File Offset: 0x001FCB3C
|
||||
[Token(Token = "0x60099D8")]
|
||||
[Address(RVA = "0x18EB760", Offset = "0x18EA560", VA = "0x1818EB760")]
|
||||
public static byte[] Encode(byte[] data)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
int length = data.Length;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099D9 RID: 39385 RVA: 0x001FE968 File Offset: 0x001FCB68
|
||||
[Token(Token = "0x60099D9")]
|
||||
[Address(RVA = "0x18EB6C0", Offset = "0x18EA4C0", VA = "0x1818EB6C0")]
|
||||
public static int Encode(byte[] data, Stream outStr)
|
||||
{
|
||||
return data.Length;
|
||||
}
|
||||
|
||||
// Token: 0x060099DA RID: 39386 RVA: 0x001FE984 File Offset: 0x001FCB84
|
||||
[Token(Token = "0x60099DA")]
|
||||
[Address(RVA = "0x18EB430", Offset = "0x18EA230", VA = "0x1818EB430")]
|
||||
public static byte[] Decode(byte[] data)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
int length = data.Length;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099DB RID: 39387 RVA: 0x001FE9B0 File Offset: 0x001FCBB0
|
||||
[Token(Token = "0x60099DB")]
|
||||
[Address(RVA = "0x18EB590", Offset = "0x18EA390", VA = "0x1818EB590")]
|
||||
public static int Decode(byte[] data, Stream outStr)
|
||||
{
|
||||
return data.Length;
|
||||
}
|
||||
|
||||
// Token: 0x060099DC RID: 39388 RVA: 0x001FE9CC File Offset: 0x001FCBCC
|
||||
[Token(Token = "0x60099DC")]
|
||||
[Address(RVA = "0x18EB2E0", Offset = "0x18EA0E0", VA = "0x1818EB2E0")]
|
||||
public static byte[] Decode(string data)
|
||||
{
|
||||
MemoryStream memoryStream = new MemoryStream();
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099DD RID: 39389 RVA: 0x001FE9F0 File Offset: 0x001FCBF0
|
||||
[Token(Token = "0x60099DD")]
|
||||
[Address(RVA = "0x18EB630", Offset = "0x18EA430", VA = "0x1818EB630")]
|
||||
public static int Decode(string data, Stream outStr)
|
||||
{
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x060099DE RID: 39390 RVA: 0x001FEA04 File Offset: 0x001FCC04
|
||||
[Token(Token = "0x60099DE")]
|
||||
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
|
||||
public UrlBase64()
|
||||
{
|
||||
}
|
||||
|
||||
// Token: 0x060099DF RID: 39391 RVA: 0x001FEA18 File Offset: 0x001FCC18
|
||||
// Note: this type is marked as 'beforefieldinit'.
|
||||
[Token(Token = "0x60099DF")]
|
||||
[Address(RVA = "0x18EB8C0", Offset = "0x18EA6C0", VA = "0x1818EB8C0")]
|
||||
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: 0x0400688D RID: 26765
|
||||
[Token(Token = "0x400688D")]
|
||||
private static readonly IEncoder encoder;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
|
||||
{
|
||||
// Token: 0x02001953 RID: 6483
|
||||
[Token(Token = "0x2001953")]
|
||||
public class UrlBase64Encoder : Base64Encoder
|
||||
{
|
||||
// Token: 0x060099E0 RID: 39392 RVA: 0x001FEA9C File Offset: 0x001FCC9C
|
||||
[Token(Token = "0x60099E0")]
|
||||
[Address(RVA = "0x18EB1E0", Offset = "0x18E9FE0", VA = "0x1818EB1E0")]
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user