using System; using System.Runtime.InteropServices; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Paddings; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs { // Token: 0x0200166C RID: 5740 [Token(Token = "0x200166C")] [StructLayout(3)] public class CMac : IMac { // Token: 0x06009944 RID: 39236 RVA: 0x00221338 File Offset: 0x0021F538 [Token(Token = "0x6009944")] [Address(RVA = "0x20E4690", Offset = "0x20E3090", VA = "0x1820E4690")] public CMac(IBlockCipher cipher) { } // Token: 0x06009945 RID: 39237 RVA: 0x0022134C File Offset: 0x0021F54C [Token(Token = "0x6009945")] [Address(RVA = "0x20E4700", Offset = "0x20E3100", VA = "0x1820E4700")] public CMac(IBlockCipher cipher, int macSizeInBits) { /* An exception occurred when decompiling this method (06009945) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CMac::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_63: stloc:ArgumentException(var_6_6D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Block size must be either 64 or 128 bits"))) } 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: 0x17001888 RID: 6280 // (get) Token: 0x06009946 RID: 39238 RVA: 0x002213C8 File Offset: 0x0021F5C8 [Token(Token = "0x17001888")] public string AlgorithmName { [Token(Token = "0x6009946")] [Address(RVA = "0x20E4960", Offset = "0x20E3360", VA = "0x1820E4960", Slot = "5")] get { IBlockCipher blockCipher = this.cipher; throw new NullReferenceException(); } } // Token: 0x06009947 RID: 39239 RVA: 0x002213E4 File Offset: 0x0021F5E4 [Token(Token = "0x6009947")] [Address(RVA = "0x20E4560", Offset = "0x20E2F60", VA = "0x1820E4560")] private static int ShiftLeft(byte[] block, byte[] output) { int length = block.Length; byte b; b += b; throw new NullReferenceException(); } // Token: 0x06009948 RID: 39240 RVA: 0x00221404 File Offset: 0x0021F604 [Token(Token = "0x6009948")] [Address(RVA = "0x20E4230", Offset = "0x20E2C30", VA = "0x1820E4230")] private static byte[] DoubleLu(byte[] input) { byte[] array = new byte[input.Length]; int num = input.Length - 1; byte b; b += b; num = input.Length; uint num2; num2 -= (uint)b; return array; } // Token: 0x06009949 RID: 39241 RVA: 0x0022143C File Offset: 0x0021F63C [Token(Token = "0x6009949")] [Address(RVA = "0x20E4340", Offset = "0x20E2D40", VA = "0x1820E4340", Slot = "4")] public void Init(ICipherParameters parameters) { /* An exception occurred when decompiling this method (06009949) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.CMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_8F: stloc:ArgumentException(var_12_9E, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CMac mode only permits key to be set."), ldstr:string("parameters"))) } 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 1663 */; } // Token: 0x0600994A RID: 39242 RVA: 0x002214E8 File Offset: 0x0021F6E8 [Token(Token = "0x600994A")] [Address(RVA = "0x3D3FF0", Offset = "0x3D29F0", VA = "0x1803D3FF0", Slot = "6")] public int GetMacSize() { return this.macSize; } // Token: 0x0600994B RID: 39243 RVA: 0x002214FC File Offset: 0x0021F6FC [Token(Token = "0x600994B")] [Address(RVA = "0x20E45E0", Offset = "0x20E2FE0", VA = "0x1820E45E0", Slot = "7")] public void Update(byte input) { byte[] array = this.buf; int num = this.bufOff; if (num == array.Length) { IBlockCipher blockCipher = this.cipher; byte[] array2 = this.mac; } int num2 = num + 1; this.bufOff = num2; } // Token: 0x0600994C RID: 39244 RVA: 0x00221548 File Offset: 0x0021F748 [Token(Token = "0x600994C")] [Address(RVA = "0x20E3E40", Offset = "0x20E2840", VA = "0x1820E3E40", Slot = "8")] public void BlockUpdate(byte[] inBytes, int inOff, int len) { IBlockCipher blockCipher = this.cipher; int num = this.bufOff; int num2 = 0; IBlockCipher blockCipher2 = this.cipher; byte[] array = this.mac; this.bufOff = num2; IBlockCipher blockCipher3 = this.cipher; if (num2 < blockCipher2) { num2 += num2; num2++; } byte[] array2 = this.buf; Array.Copy(inBytes, inOff, array2, num, len); } // Token: 0x0600994D RID: 39245 RVA: 0x002215B0 File Offset: 0x0021F7B0 [Token(Token = "0x600994D")] [Address(RVA = "0x20E4050", Offset = "0x20E2A50", VA = "0x1820E4050", Slot = "9")] public int DoFinal(byte[] outBytes, int outOff) { IBlockCipher blockCipher = this.cipher; ISO7816d4Padding iso7816d4Padding = new ISO7816d4Padding(); int num = this.bufOff; byte[] array = this.buf; int num2 = iso7816d4Padding.AddPadding(array, num); byte[] lu = this.Lu; byte[] array2 = this.mac; int num3 = 0; if (num3 < array2.Length) { byte[] array3 = this.buf; num3++; byte[] array4 = this.mac; } IBlockCipher blockCipher2 = this.cipher; int num4 = this.macSize; byte[] array5 = this.mac; int num5 = 0; Array.Copy(array5, num5, outBytes, outOff, num4); byte[] array6 = this.buf; int length = array6.Length; int num6 = 0; Array.Clear(array6, num6, length); IBlockCipher blockCipher3 = this.cipher; this.bufOff = num3; return this.macSize; } // Token: 0x0600994E RID: 39246 RVA: 0x0022167C File Offset: 0x0021F87C [Token(Token = "0x600994E")] [Address(RVA = "0x20E44F0", Offset = "0x20E2EF0", VA = "0x1820E44F0", Slot = "10")] public void Reset() { byte[] array = this.buf; int length = array.Length; int num = 0; Array.Clear(array, num, length); IBlockCipher blockCipher = this.cipher; this.bufOff = (int)((ulong)0L); throw new NullReferenceException(); } // Token: 0x040064A2 RID: 25762 [Token(Token = "0x40064A2")] private const byte CONSTANT_128 = 135; // Token: 0x040064A3 RID: 25763 [Token(Token = "0x40064A3")] private const byte CONSTANT_64 = 27; // Token: 0x040064A4 RID: 25764 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x40064A4")] private byte[] ZEROES; // Token: 0x040064A5 RID: 25765 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x40064A5")] private byte[] mac; // Token: 0x040064A6 RID: 25766 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x40064A6")] private byte[] buf; // Token: 0x040064A7 RID: 25767 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x40064A7")] private int bufOff; // Token: 0x040064A8 RID: 25768 [global::Cpp2IlInjected.FieldOffset(Offset = "0x30")] [Token(Token = "0x40064A8")] private IBlockCipher cipher; // Token: 0x040064A9 RID: 25769 [global::Cpp2IlInjected.FieldOffset(Offset = "0x38")] [Token(Token = "0x40064A9")] private int macSize; // Token: 0x040064AA RID: 25770 [global::Cpp2IlInjected.FieldOffset(Offset = "0x40")] [Token(Token = "0x40064AA")] private byte[] L; // Token: 0x040064AB RID: 25771 [global::Cpp2IlInjected.FieldOffset(Offset = "0x48")] [Token(Token = "0x40064AB")] private byte[] Lu; // Token: 0x040064AC RID: 25772 [global::Cpp2IlInjected.FieldOffset(Offset = "0x50")] [Token(Token = "0x40064AC")] private byte[] Lu2; } }