Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Utilities/Encoders/BufferedDecoder.cs
T
2026-04-08 23:40:05 +02:00

105 lines
5.5 KiB
C#

using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Encoders
{
// Token: 0x0200136E RID: 4974
[Token(Token = "0x200136E")]
[StructLayout(3)]
public class BufferedDecoder
{
// Token: 0x06007DDA RID: 32218 RVA: 0x001A6C54 File Offset: 0x001A4E54
[Token(Token = "0x6007DDA")]
[Address(RVA = "0x1C5E130", Offset = "0x1C5CB30", VA = "0x181C5E130")]
public BufferedDecoder(ITranslator translator, int bufferSize)
{
/*
An exception occurred when decompiling this method (06007DDA)
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: 0x06007DDB RID: 32219 RVA: 0x001A6C98 File Offset: 0x001A4E98
[Token(Token = "0x6007DDB")]
[Address(RVA = "0x1C5DE80", Offset = "0x1C5C880", VA = "0x181C5DE80")]
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: 0x06007DDC RID: 32220 RVA: 0x001A6CF0 File Offset: 0x001A4EF0
[Token(Token = "0x6007DDC")]
[Address(RVA = "0x1C5DF60", Offset = "0x1C5C960", VA = "0x181C5DF60")]
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: 0x04005A40 RID: 23104
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4005A40")]
internal byte[] buffer;
// Token: 0x04005A41 RID: 23105
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4005A41")]
internal int bufOff;
// Token: 0x04005A42 RID: 23106
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4005A42")]
internal ITranslator translator;
}
}