using System; using System.Runtime.InteropServices; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs { // Token: 0x02001679 RID: 5753 [Token(Token = "0x2001679")] [StructLayout(3)] public class VmpcMac : IMac { // Token: 0x060099CF RID: 39375 RVA: 0x0022404C File Offset: 0x0022224C [Token(Token = "0x60099CF")] [Address(RVA = "0x20FB490", Offset = "0x20F9E90", VA = "0x1820FB490", Slot = "11")] public virtual int DoFinal(byte[] output, int outOff) { byte[] p = this.P; byte b = this.n; int length = p.Length; byte b2 = this.s; byte b3; b3 += b2; byte b4; this.s = b4; byte b5 = this.x3; byte b6 = this.x4; b6 += b5; uint num; b6 = (byte)((uint)b6 + num); b3 = b6; byte b7; this.x4 = b7; b7 = (byte)((uint)b7 + num); b3 = b7; byte b8; this.x3 = b8; byte b9 = this.x1; b8 = (byte)((uint)b8 + num); b3 = b8; byte b10; this.x2 = b10; b10 = b4; b10 += b9; b10 = (byte)((uint)b10 + num); b3 = b10; byte[] t = this.T; byte b11; this.x1 = b11; byte b12 = this.g; byte[] t2 = this.T; byte b13 = this.g; byte[] t3 = this.T; byte b14 = this.g; byte[] t4 = this.T; byte b15 = this.g; byte b16 = this.g; byte[] p2 = this.P; this.g = b16; byte b17 = this.n; int length2 = p2.Length; byte b18 = this.s; byte[] p3 = this.P; byte b19 = this.s; num += (uint)1; int num2 = 0; byte[] p4 = this.P; int length3 = p4.Length; byte[] t5 = this.T; byte b20; byte b21; b20 += b21; byte b22 = this.s; b20 += b22; byte b23; this.s = b23; int length4 = p4.Length; byte[] p5 = this.P; byte b24 = this.s; num2++; byte[] array = new byte[20]; int num3 = 0; byte[] p6 = this.P; int length5 = p6.Length; byte b25 = this.s; byte b26; b26 += b25; byte b27; this.s = b27; int length6 = p6.Length; int length7 = this.P.Length; byte b28 = this.s; byte[] p7 = this.P; byte b29 = this.s; num3++; int length8 = array.Length; int num4 = 0; Array.Copy(array, num4, output, outOff, length8); return array.Length; } // Token: 0x17001896 RID: 6294 // (get) Token: 0x060099D0 RID: 39376 RVA: 0x00224270 File Offset: 0x00222470 [Token(Token = "0x17001896")] public virtual string AlgorithmName { [Token(Token = "0x60099D0")] [Address(RVA = "0x20FC1F0", Offset = "0x20FABF0", VA = "0x1820FC1F0", Slot = "12")] get { return "VMPC-MAC"; } } // Token: 0x060099D1 RID: 39377 RVA: 0x00224284 File Offset: 0x00222484 [Token(Token = "0x60099D1")] [Address(RVA = "0x15A18C0", Offset = "0x15A02C0", VA = "0x1815A18C0", Slot = "13")] public virtual int GetMacSize() { return 20; } // Token: 0x060099D2 RID: 39378 RVA: 0x00224294 File Offset: 0x00222494 [Token(Token = "0x60099D2")] [Address(RVA = "0x20FBB50", Offset = "0x20FA550", VA = "0x1820FBB50", Slot = "14")] public virtual void Init(ICipherParameters parameters) { /* An exception occurred when decompiling this method (060099D2) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.VmpcMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_51: stloc:ArgumentException(var_8_60, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("VMPC-MAC requires 1 to 768 bytes of IV"), 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.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: 0x060099D3 RID: 39379 RVA: 0x00224304 File Offset: 0x00222504 [Token(Token = "0x60099D3")] [Address(RVA = "0x20FC220", Offset = "0x20FAC20", VA = "0x1820FC220")] private void initKey(byte[] keyBytes, byte[] ivBytes) { this.s = (byte)((ulong)0L); byte[] array = new byte[256]; int num = 0; this.P = array; byte[] p = this.P; num++; byte[] p2 = this.P; int length = p2.Length; byte b = p[keyBytes]; byte b2; b += b2; byte b3 = this.s; b += b3; byte b4; this.s = b4; int length2 = p2.Length; byte[] p3 = this.P; byte b5 = this.s; num++; byte[] p4 = this.P; int length3 = p4.Length; int length4 = ivBytes.Length; byte b6; byte b7; b6 += b7; byte b8 = this.s; b6 += b8; byte b9; this.s = b9; int length5 = p4.Length; byte[] p5 = this.P; byte b10 = this.s; num++; this.n = (byte)((ulong)0L); } // Token: 0x060099D4 RID: 39380 RVA: 0x002243FC File Offset: 0x002225FC [Token(Token = "0x60099D4")] [Address(RVA = "0x20FBDB0", Offset = "0x20FA7B0", VA = "0x1820FBDB0", Slot = "15")] public virtual void Reset() { byte[] array = this.workingIV; byte[] array2 = this.workingKey; this.initKey(array2, array); this.g = (byte)((ulong)0L); this.x1 = (byte)((ulong)0L); byte[] array3 = new byte[32]; this.T = array3; int num = 0; byte[] t = this.T; num++; } // Token: 0x060099D5 RID: 39381 RVA: 0x00224454 File Offset: 0x00222654 [Token(Token = "0x60099D5")] [Address(RVA = "0x20FBE50", Offset = "0x20FA850", VA = "0x1820FBE50", Slot = "16")] public virtual void Update(byte input) { byte[] p = this.P; byte b = this.n; int length = p.Length; byte b2 = this.s; byte b3; b3 += b2; byte b4; this.s = b4; int length2 = p.Length; byte b5 = this.x3; byte b6 = this.x4; b6 += b5; byte b7; this.x4 = b7; byte b8; this.x3 = b8; b7 = b8; byte b9; this.x2 = b9; byte b10 = this.s; b10 += b9; b9 = b10; byte[] t = this.T; byte b11; this.x1 = b11; byte b12 = this.g; byte[] t2 = this.T; byte b13 = this.g; byte b14 = this.x2; byte[] t3 = this.T; byte b15 = this.g; byte b16 = this.x3; byte[] t4 = this.T; byte b17 = this.g; byte b18 = this.g; this.g = b18; byte[] p2 = this.P; byte b19 = this.n; int length3 = p2.Length; byte b20 = this.s; byte b21; p2[0] = b21; byte[] p3 = this.P; byte b22 = this.s; } // Token: 0x060099D6 RID: 39382 RVA: 0x0022458C File Offset: 0x0022278C [Token(Token = "0x60099D6")] [Address(RVA = "0x20FB3A0", Offset = "0x20F9DA0", VA = "0x1820FB3A0", Slot = "17")] public virtual void BlockUpdate(byte[] input, int inOff, int len) { if (len > 0) { this.Reset(); } } // Token: 0x060099D7 RID: 39383 RVA: 0x002245AC File Offset: 0x002227AC [Token(Token = "0x60099D7")] [Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")] public VmpcMac() { } // Token: 0x0400650C RID: 25868 [global::Cpp2IlInjected.FieldOffset(Offset = "0x10")] [Token(Token = "0x400650C")] private byte g; // Token: 0x0400650D RID: 25869 [global::Cpp2IlInjected.FieldOffset(Offset = "0x11")] [Token(Token = "0x400650D")] private byte n; // Token: 0x0400650E RID: 25870 [global::Cpp2IlInjected.FieldOffset(Offset = "0x18")] [Token(Token = "0x400650E")] private byte[] P; // Token: 0x0400650F RID: 25871 [global::Cpp2IlInjected.FieldOffset(Offset = "0x20")] [Token(Token = "0x400650F")] private byte s; // Token: 0x04006510 RID: 25872 [global::Cpp2IlInjected.FieldOffset(Offset = "0x28")] [Token(Token = "0x4006510")] private byte[] T; // Token: 0x04006511 RID: 25873 [global::Cpp2IlInjected.FieldOffset(Offset = "0x30")] [Token(Token = "0x4006511")] private byte[] workingIV; // Token: 0x04006512 RID: 25874 [global::Cpp2IlInjected.FieldOffset(Offset = "0x38")] [Token(Token = "0x4006512")] private byte[] workingKey; // Token: 0x04006513 RID: 25875 [global::Cpp2IlInjected.FieldOffset(Offset = "0x40")] [Token(Token = "0x4006513")] private byte x1; // Token: 0x04006514 RID: 25876 [global::Cpp2IlInjected.FieldOffset(Offset = "0x41")] [Token(Token = "0x4006514")] private byte x2; // Token: 0x04006515 RID: 25877 [global::Cpp2IlInjected.FieldOffset(Offset = "0x42")] [Token(Token = "0x4006515")] private byte x3; // Token: 0x04006516 RID: 25878 [global::Cpp2IlInjected.FieldOffset(Offset = "0x43")] [Token(Token = "0x4006516")] private byte x4; } }