using System; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes { // Token: 0x02001C35 RID: 7221 [Token(Token = "0x2001C35")] public class CtsBlockCipher : BufferedBlockCipher { // Token: 0x0600B445 RID: 46149 RVA: 0x00273DB0 File Offset: 0x00271FB0 [Token(Token = "0x600B445")] [Address(RVA = "0x1C1F7C0", Offset = "0x1C1E5C0", VA = "0x181C1F7C0")] public CtsBlockCipher(IBlockCipher cipher) { /* An exception occurred when decompiling this method (0600B445) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_3B: stloc:ArgumentException(var_3_45, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CtsBlockCipher can only accept ECB, or CBC ciphers"))) } 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: 0x0600B446 RID: 46150 RVA: 0x00273E04 File Offset: 0x00272004 [Token(Token = "0x600B446")] [Address(RVA = "0x1810360", Offset = "0x180F160", VA = "0x181810360", Slot = "26")] public override int GetUpdateOutputSize(int length) { byte[] buf = this.buf; int num = this.bufOff; int length2 = buf.Length; num += length; if (length != 0) { return num - length; } return num - length2; } // Token: 0x0600B447 RID: 46151 RVA: 0x00273E40 File Offset: 0x00272040 [Token(Token = "0x600B447")] [Address(RVA = "0x1B33830", Offset = "0x1B32630", VA = "0x181B33830", Slot = "25")] public override int GetOutputSize(int length) { int bufOff = this.bufOff; return bufOff + length; } // Token: 0x0600B448 RID: 46152 RVA: 0x00273E5C File Offset: 0x0027205C [Token(Token = "0x600B448")] [Address(RVA = "0x1C1F3D0", Offset = "0x1C1E1D0", VA = "0x181C1F3D0", Slot = "28")] public override int ProcessByte(byte input, byte[] output, int outOff) { byte[] buf = this.buf; int num = 0; int bufOff = this.bufOff; if (bufOff == buf.Length) { IBlockCipher cipher = this.cipher; byte[] buf2 = this.buf; int num2 = 0; int num3 = this.blockSize; Array.Copy(buf2, num3, buf2, num2, num3); } int num4 = bufOff + 1; this.bufOff = num4; return num; } // Token: 0x0600B449 RID: 46153 RVA: 0x00273EC4 File Offset: 0x002720C4 [Token(Token = "0x600B449")] [Address(RVA = "0x1C1F4D0", Offset = "0x1C1E2D0", VA = "0x181C1F4D0", Slot = "32")] public override int ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff) { /* An exception occurred when decompiling this method (0600B449) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::ProcessBytes(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_8C: stloc:uint8[](var_15_95, ldfld:uint8[](BufferedBlockCipher::buf, ldloc:CtsBlockCipher[exp:BufferedBlockCipher](this))) call:void(Array::Copy, ldloc:uint8[][exp:Array](input), ldloc:int32(inOff), ldloc:uint8[][exp:Array](var_15_95), ldloc:int32(var_13), ldloc:int32(length)) stloc:ArgumentException(var_16_AD, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Can't have a negative input outLength!"))) } 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: 0x0600B44A RID: 46154 RVA: 0x00273F80 File Offset: 0x00272180 [Token(Token = "0x600B44A")] [Address(RVA = "0x1C1EF40", Offset = "0x1C1DD40", VA = "0x181C1EF40", Slot = "36")] public override int DoFinal(byte[] output, int outOff) { for (;;) { int num = this.bufOff; num += outOff; IBlockCipher cipher = this.cipher; int bufOff = this.bufOff; byte[] array = new byte[0]; byte[] array2 = new byte[0]; IBlockCipher cipher2 = this.cipher; if (cipher2 == 0 || cipher2 != 0) { byte[] buf = this.buf; byte[] buf2 = this.buf; IBlockCipher cipher3 = this.cipher; IBlockCipher cipher4 = this.cipher; int num2 = this.bufOff; byte[] buf3 = this.buf; if (num2 != buf3.Length) { num2++; num2++; byte[] buf4 = this.buf; } byte[] buf5 = this.buf; num2 += buf5; num2++; IBlockCipher cipher5 = this.cipher; if (cipher5 == 0 || cipher5 != 0) { break; } } } int num3; return num3; } // Token: 0x04007264 RID: 29284 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4007264")] private readonly int blockSize; } }