using System; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm; using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes { // Token: 0x02001C38 RID: 7224 [Token(Token = "0x2001C38")] public sealed class GcmBlockCipher : IAeadBlockCipher { // Token: 0x0600B45E RID: 46174 RVA: 0x00274748 File Offset: 0x00272948 [Token(Token = "0x600B45E")] [Address(RVA = "0x1C24990", Offset = "0x1C23790", VA = "0x181C24990")] public GcmBlockCipher(IBlockCipher c) { /* An exception occurred when decompiling this method (0600B45E) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_45: stloc:ArgumentException(var_5_5B, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_4), ldstr:string[exp:object](".")))) } 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 1660 */; } // Token: 0x0600B45F RID: 46175 RVA: 0x002747B4 File Offset: 0x002729B4 [Token(Token = "0x600B45F")] [Address(RVA = "0x1C24AD0", Offset = "0x1C238D0", VA = "0x181C24AD0")] public GcmBlockCipher(IBlockCipher c, IGcmMultiplier m) { /* An exception occurred when decompiling this method (0600B45F) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm.IGcmMultiplier) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_49: stloc:ArgumentException(var_5_5F, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_4), ldstr:string[exp:object](".")))) } 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 1660 */; } // Token: 0x17001C7B RID: 7291 // (get) Token: 0x0600B460 RID: 46176 RVA: 0x00274824 File Offset: 0x00272A24 [Token(Token = "0x17001C7B")] public string AlgorithmName { [Token(Token = "0x600B460")] [Address(RVA = "0x1C24F20", Offset = "0x1C23D20", VA = "0x181C24F20", Slot = "4")] get { IBlockCipher blockCipher = this.cipher; return 0 + "/GCM"; } } // Token: 0x0600B461 RID: 46177 RVA: 0x0027484C File Offset: 0x00272A4C [Token(Token = "0x600B461")] [Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40", Slot = "5")] public IBlockCipher GetUnderlyingCipher() { return this.cipher; } // Token: 0x0600B462 RID: 46178 RVA: 0x00274860 File Offset: 0x00272A60 [Token(Token = "0x600B462")] [Address(RVA = "0x4B6B10", Offset = "0x4B5910", VA = "0x1804B6B10", Slot = "7")] public int GetBlockSize() { return 16; } // Token: 0x0600B463 RID: 46179 RVA: 0x00274870 File Offset: 0x00272A70 [Token(Token = "0x600B463")] [Address(RVA = "0x1C23810", Offset = "0x1C22610", VA = "0x181C23810", Slot = "6")] public void Init(bool forEncryption, ICipherParameters parameters) { /* An exception occurred when decompiling this method (0600B463) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_291: stloc:ArgumentException(var_45_29B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key must be specified in initial init"))) } 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 1660 */; } // Token: 0x0600B464 RID: 46180 RVA: 0x00274B1C File Offset: 0x00272D1C [Token(Token = "0x600B464")] [Address(RVA = "0x1C234C0", Offset = "0x1C222C0", VA = "0x181C234C0", Slot = "13")] public byte[] GetMac() { byte[] array = this.macBlock; if (array == 0) { } return Arrays.Clone(array); } // Token: 0x0600B465 RID: 46181 RVA: 0x00274B3C File Offset: 0x00272D3C [Token(Token = "0x600B465")] [Address(RVA = "0x1C236F0", Offset = "0x1C224F0", VA = "0x181C236F0", Slot = "15")] public int GetOutputSize(int len) { int num = this.bufOff; int num2 = this.macSize; num += len; if (this.forEncryption) { return num2 + num; } if (num < num2) { return 0; } return num - num2; } // Token: 0x0600B466 RID: 46182 RVA: 0x00274B78 File Offset: 0x00272D78 [Token(Token = "0x600B466")] [Address(RVA = "0x1C23720", Offset = "0x1C22520", VA = "0x181C23720", Slot = "14")] public int GetUpdateOutputSize(int len) { int num = this.bufOff; num += len; int num2; if (!this.forEncryption) { num2 = this.macSize; num -= num2; } if (num < num2) { num++; } return num - num; } // Token: 0x0600B467 RID: 46183 RVA: 0x00274BB4 File Offset: 0x00272DB4 [Token(Token = "0x600B467")] [Address(RVA = "0x1C23F80", Offset = "0x1C22D80", VA = "0x181C23F80", Slot = "8")] public void ProcessAadByte(byte input) { this.CheckStatus(); byte[] array = this.atBlock; int num = this.atBlockPos; int num2 = this.atBlockPos; num2++; this.atBlockPos = num2; if (num2 == 16) { byte[] array2 = this.atBlock; byte[] s_at = this.S_at; this.gHASHBlock(s_at, array2); this.atBlockPos = (int)((ulong)0L); } } // Token: 0x0600B468 RID: 46184 RVA: 0x00274C14 File Offset: 0x00272E14 [Token(Token = "0x600B468")] [Address(RVA = "0x1C24010", Offset = "0x1C22E10", VA = "0x181C24010", Slot = "9")] public void ProcessAadBytes(byte[] inBytes, int inOff, int len) { this.CheckStatus(); if (len > 0) { int num = 0; byte[] array = this.atBlock; int num2 = this.atBlockPos; int num3 = this.atBlockPos; num3++; this.atBlockPos = num3; if (num3 == 16) { byte[] array2 = this.atBlock; byte[] s_at = this.S_at; this.gHASHBlock(s_at, array2); this.atBlockPos = num; } num3 = inOff - inOff; } } // Token: 0x0600B469 RID: 46185 RVA: 0x00274C88 File Offset: 0x00272E88 [Token(Token = "0x600B469")] [Address(RVA = "0x1C23750", Offset = "0x1C22550", VA = "0x181C23750")] private void InitCipher() { if (this.atLength > (ulong)0L) { byte[] s_atPre = this.S_atPre; int num = 0; byte[] s_at = this.S_at; int num2 = 0; ulong num3; Array.Copy(s_at, num2, s_atPre, num, (int)num3); ulong num4 = this.atLength; this.atLengthPre = num4; } int num5 = this.atBlockPos; if (num5 > 0) { byte[] array = this.atBlock; int num6 = 0; byte[] s_atPre2 = this.S_atPre; this.gHASHPartial(s_atPre2, array, num6, num5); } if (this.atLengthPre != (ulong)0L) { byte[] s = this.S; int num7 = 0; byte[] s_atPre3 = this.S_atPre; int num8 = 0; ulong num9; Array.Copy(s_atPre3, num8, s, num7, (int)num9); } } // Token: 0x0600B46A RID: 46186 RVA: 0x00274D2C File Offset: 0x00272F2C [Token(Token = "0x600B46A")] [Address(RVA = "0x1C242F0", Offset = "0x1C230F0", VA = "0x181C242F0", Slot = "10")] public int ProcessByte(byte input, byte[] output, int outOff) { this.CheckStatus(); byte[] array = this.bufBlock; int num = this.bufOff; int num2 = this.bufOff; byte[] array2 = this.bufBlock; num2++; this.bufOff = num2; if (num2 != array2.Length) { return 0; } int num3 = 0; int num4 = 0; this.ProcessBlock(array2, num4, output, outOff); int num7; if ((this.forEncryption ? 1 : 0) == num3) { byte[] array3 = this.bufBlock; int num5 = this.macSize; int num6 = 0; Array.Copy(array3, 16, array3, num6, num5); num7 = this.macSize; } this.bufOff = num7; throw new NullReferenceException(); } // Token: 0x0600B46B RID: 46187 RVA: 0x00274DC4 File Offset: 0x00272FC4 [Token(Token = "0x600B46B")] [Address(RVA = "0x1C243D0", Offset = "0x1C231D0", VA = "0x181C243D0", Slot = "11")] public int ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff) { this.CheckStatus(); Check.DataLength(input, inOff, inOff, "input buffer too short"); int num = 0; if ((this.forEncryption ? 1 : 0) == num) { if (len <= 0) { return num; } byte[] array = this.bufBlock; int num2 = this.bufOff; int num3 = this.bufOff; byte[] array2 = this.bufBlock; num3++; this.bufOff = num3; if (num3 == array2.Length) { byte[] array3 = this.bufBlock; int num4 = 0; int num5 = this.macSize; Array.Copy(array3, 16, array3, num4, num5); int num6 = this.macSize; num += 16; this.bufOff = num6; } num3 = inOff - inOff; } if (this.bufOff != 0 && len > 0) { byte[] array4 = this.bufBlock; int num7 = this.bufOff; num7++; this.bufOff = num7; if (num7 == 16) { this.bufOff = num; throw new NullReferenceException(); } } num += 16; while (len != 16) { } if (len > 0) { byte[] array5 = this.bufBlock; int num8 = 0; Array.Copy(input, inOff, array5, num8, len); this.bufOff = len; } return num; } // Token: 0x0600B46C RID: 46188 RVA: 0x00274EDC File Offset: 0x002730DC [Token(Token = "0x600B46C")] [Address(RVA = "0x1C22E40", Offset = "0x1C21C40", VA = "0x181C22E40", Slot = "12")] public int DoFinal(byte[] output, int outOff) { /* An exception occurred when decompiling this method (0600B46C) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::DoFinal(System.Byte[],System.Int32) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_2FB: stloc:InvalidCipherTextException(var_58_305, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in GCM failed"))) } 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.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 1660 */; } // Token: 0x0600B46D RID: 46189 RVA: 0x002751F0 File Offset: 0x002733F0 [Token(Token = "0x600B46D")] [Address(RVA = "0x1C247E0", Offset = "0x1C235E0", VA = "0x181C247E0", Slot = "16")] public void Reset() { this.Reset(true); } // Token: 0x0600B46E RID: 46190 RVA: 0x00275204 File Offset: 0x00273404 [Token(Token = "0x600B46E")] [Address(RVA = "0x1C247F0", Offset = "0x1C235F0", VA = "0x181C247F0")] private void Reset(bool clearMac) { IBlockCipher blockCipher = this.cipher; byte[] array = new byte[16]; this.S = array; byte[] array2 = new byte[16]; this.S_at = array2; byte[] array3 = new byte[16]; this.S_atPre = array3; byte[] array4 = new byte[16]; byte[] j = this.J0; int num = 0; this.atBlockPos = num; this.atLength = (ulong)num; this.atLengthPre = (ulong)num; this.atBlock = array4; byte[] array5 = Arrays.Clone(j); byte[] array6 = this.bufBlock; this.counter = array5; this.blocksRemaining = (uint)((ulong)4294967294L); this.bufOff = num; this.totalLength = (ulong)num; if (array6 != 0) { int num2 = 0; Arrays.Fill(array6, (byte)num2); } if (clearMac) { this.macBlock = num; } if ((this.forEncryption ? 1 : 0) == num) { byte[] array7 = this.initialAssociatedText; if (array7 != 0) { int length = array7.Length; int num3 = 0; this.ProcessAadBytes(array7, num3, length); } return; } } // Token: 0x0600B46F RID: 46191 RVA: 0x00275308 File Offset: 0x00273508 [Token(Token = "0x600B46F")] [Address(RVA = "0x1C24110", Offset = "0x1C22F10", VA = "0x181C24110")] private void ProcessBlock(byte[] buf, int bufOff, byte[] output, int outOff) { if (this.totalLength == (ulong)0L) { this.InitCipher(); } byte[] array = this.ctrBlock; this.GetNextCtrBlock(array); if (!this.forEncryption) { GcmUtilities.Xor(this.S, buf, bufOff); IGcmMultiplier gcmMultiplier = this.multiplier; byte[] array2 = this.ctrBlock; } GcmUtilities.Xor(this.ctrBlock, buf, bufOff); byte[] array3 = this.ctrBlock; byte[] s = this.S; this.gHASHBlock(s, array3); byte[] array4 = this.ctrBlock; } // Token: 0x0600B470 RID: 46192 RVA: 0x00275390 File Offset: 0x00273590 [Token(Token = "0x600B470")] [Address(RVA = "0x1C246A0", Offset = "0x1C234A0", VA = "0x181C246A0")] private void ProcessPartial(byte[] buf, int off, int len, byte[] output, int outOff) { byte[] array = this.ctrBlock; this.GetNextCtrBlock(array); if (!this.forEncryption) { byte[] s = this.S; this.gHASHPartial(s, buf, len, len); byte[] array2 = this.ctrBlock; int num = 0; GcmUtilities.Xor(buf, off, array2, num, len); } byte[] array3 = this.ctrBlock; int num2 = 0; GcmUtilities.Xor(buf, off, array3, num2, len); byte[] s2 = this.S; this.gHASHPartial(s2, buf, off, len); } // Token: 0x0600B471 RID: 46193 RVA: 0x0027540C File Offset: 0x0027360C [Token(Token = "0x600B471")] [Address(RVA = "0x1C24E50", Offset = "0x1C23C50", VA = "0x181C24E50")] private void gHASH(byte[] Y, byte[] b, int len) { int num = 0; if (len > 0) { int num2 = Math.Min(len, 16); this.gHASHPartial(Y, b, num, num2); num += 16; } } // Token: 0x0600B472 RID: 46194 RVA: 0x00275438 File Offset: 0x00273638 [Token(Token = "0x600B472")] [Address(RVA = "0x1C24CC0", Offset = "0x1C23AC0", VA = "0x181C24CC0")] private void gHASHBlock(byte[] Y, byte[] b) { GcmUtilities.Xor(Y, b); IGcmMultiplier gcmMultiplier = this.multiplier; throw new NullReferenceException(); } // Token: 0x0600B473 RID: 46195 RVA: 0x00275458 File Offset: 0x00273658 [Token(Token = "0x600B473")] [Address(RVA = "0x1C24C10", Offset = "0x1C23A10", VA = "0x181C24C10")] private void gHASHBlock(byte[] Y, byte[] b, int off) { GcmUtilities.Xor(Y, b, off); IGcmMultiplier gcmMultiplier = this.multiplier; throw new NullReferenceException(); } // Token: 0x0600B474 RID: 46196 RVA: 0x0027547C File Offset: 0x0027367C [Token(Token = "0x600B474")] [Address(RVA = "0x1C24D60", Offset = "0x1C23B60", VA = "0x181C24D60")] private void gHASHPartial(byte[] Y, byte[] b, int off, int len) { IGcmMultiplier gcmMultiplier = this.multiplier; throw new NullReferenceException(); } // Token: 0x0600B475 RID: 46197 RVA: 0x00275498 File Offset: 0x00273698 [Token(Token = "0x600B475")] [Address(RVA = "0x1C23540", Offset = "0x1C22340", VA = "0x181C23540")] private void GetNextCtrBlock(byte[] block) { /* An exception occurred when decompiling this method (0600B475) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::GetNextCtrBlock(System.Byte[]) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_9E: stloc:InvalidOperationException(var_11_A8, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Attempt to process too many blocks"))) } 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 1660 */; } // Token: 0x0600B476 RID: 46198 RVA: 0x00275550 File Offset: 0x00273750 [Token(Token = "0x600B476")] [Address(RVA = "0x1C22DA0", Offset = "0x1C21BA0", VA = "0x181C22DA0")] private void CheckStatus() { /* An exception occurred when decompiling this method (0600B476) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::CheckStatus() ---> System.Exception: Basic block has to end with unconditional control flow. { IL_13: stloc:InvalidOperationException(var_0_1D, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("GCM cipher cannot be reused for encryption"))) } 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 1660 */; } // Token: 0x04007275 RID: 29301 [Token(Token = "0x4007275")] private const int BlockSize = 16; // Token: 0x04007276 RID: 29302 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007276")] private byte[] ctrBlock; // Token: 0x04007277 RID: 29303 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4007277")] private readonly IBlockCipher cipher; // Token: 0x04007278 RID: 29304 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4007278")] private readonly IGcmMultiplier multiplier; // Token: 0x04007279 RID: 29305 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4007279")] private IGcmExponentiator exp; // Token: 0x0400727A RID: 29306 [FieldOffset(Offset = "0x30")] [Token(Token = "0x400727A")] private bool forEncryption; // Token: 0x0400727B RID: 29307 [FieldOffset(Offset = "0x31")] [Token(Token = "0x400727B")] private bool initialised; // Token: 0x0400727C RID: 29308 [FieldOffset(Offset = "0x34")] [Token(Token = "0x400727C")] private int macSize; // Token: 0x0400727D RID: 29309 [FieldOffset(Offset = "0x38")] [Token(Token = "0x400727D")] private byte[] lastKey; // Token: 0x0400727E RID: 29310 [FieldOffset(Offset = "0x40")] [Token(Token = "0x400727E")] private byte[] nonce; // Token: 0x0400727F RID: 29311 [FieldOffset(Offset = "0x48")] [Token(Token = "0x400727F")] private byte[] initialAssociatedText; // Token: 0x04007280 RID: 29312 [FieldOffset(Offset = "0x50")] [Token(Token = "0x4007280")] private byte[] H; // Token: 0x04007281 RID: 29313 [FieldOffset(Offset = "0x58")] [Token(Token = "0x4007281")] private byte[] J0; // Token: 0x04007282 RID: 29314 [FieldOffset(Offset = "0x60")] [Token(Token = "0x4007282")] private byte[] bufBlock; // Token: 0x04007283 RID: 29315 [FieldOffset(Offset = "0x68")] [Token(Token = "0x4007283")] private byte[] macBlock; // Token: 0x04007284 RID: 29316 [FieldOffset(Offset = "0x70")] [Token(Token = "0x4007284")] private byte[] S; // Token: 0x04007285 RID: 29317 [FieldOffset(Offset = "0x78")] [Token(Token = "0x4007285")] private byte[] S_at; // Token: 0x04007286 RID: 29318 [FieldOffset(Offset = "0x80")] [Token(Token = "0x4007286")] private byte[] S_atPre; // Token: 0x04007287 RID: 29319 [FieldOffset(Offset = "0x88")] [Token(Token = "0x4007287")] private byte[] counter; // Token: 0x04007288 RID: 29320 [FieldOffset(Offset = "0x90")] [Token(Token = "0x4007288")] private uint blocksRemaining; // Token: 0x04007289 RID: 29321 [FieldOffset(Offset = "0x94")] [Token(Token = "0x4007289")] private int bufOff; // Token: 0x0400728A RID: 29322 [FieldOffset(Offset = "0x98")] [Token(Token = "0x400728A")] private ulong totalLength; // Token: 0x0400728B RID: 29323 [FieldOffset(Offset = "0xA0")] [Token(Token = "0x400728B")] private byte[] atBlock; // Token: 0x0400728C RID: 29324 [FieldOffset(Offset = "0xA8")] [Token(Token = "0x400728C")] private int atBlockPos; // Token: 0x0400728D RID: 29325 [FieldOffset(Offset = "0xB0")] [Token(Token = "0x400728D")] private ulong atLength; // Token: 0x0400728E RID: 29326 [FieldOffset(Offset = "0xB8")] [Token(Token = "0x400728E")] private ulong atLengthPre; } }