using System; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs { // Token: 0x02001D36 RID: 7478 [Token(Token = "0x2001D36")] public class VmpcMac : IMac { // Token: 0x0600B977 RID: 47479 RVA: 0x002847B8 File Offset: 0x002829B8 [Token(Token = "0x600B977")] [Address(RVA = "0x25C9EB0", Offset = "0x25C8EB0", VA = "0x1825C9EB0", 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: 0x17001D34 RID: 7476 // (get) Token: 0x0600B978 RID: 47480 RVA: 0x002849DC File Offset: 0x00282BDC [Token(Token = "0x17001D34")] public virtual string AlgorithmName { [Token(Token = "0x600B978")] [Address(RVA = "0x25CAC10", Offset = "0x25C9C10", VA = "0x1825CAC10", Slot = "12")] get { return "VMPC-MAC"; } } // Token: 0x0600B979 RID: 47481 RVA: 0x002849F0 File Offset: 0x00282BF0 [Token(Token = "0x600B979")] [Address(RVA = "0xC42C40", Offset = "0xC41C40", VA = "0x180C42C40", Slot = "13")] public virtual int GetMacSize() { return 20; } // Token: 0x0600B97A RID: 47482 RVA: 0x00284A00 File Offset: 0x00282C00 [Token(Token = "0x600B97A")] [Address(RVA = "0x25CA570", Offset = "0x25C9570", VA = "0x1825CA570", Slot = "14")] public virtual void Init(ICipherParameters parameters) { /* An exception occurred when decompiling this method (0600B97A) 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: 0x0600B97B RID: 47483 RVA: 0x00284A70 File Offset: 0x00282C70 [Token(Token = "0x600B97B")] [Address(RVA = "0x25CAC40", Offset = "0x25C9C40", VA = "0x1825CAC40")] 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: 0x0600B97C RID: 47484 RVA: 0x00284B68 File Offset: 0x00282D68 [Token(Token = "0x600B97C")] [Address(RVA = "0x25CA7D0", Offset = "0x25C97D0", VA = "0x1825CA7D0", 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: 0x0600B97D RID: 47485 RVA: 0x00284BC0 File Offset: 0x00282DC0 [Token(Token = "0x600B97D")] [Address(RVA = "0x25CA870", Offset = "0x25C9870", VA = "0x1825CA870", 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: 0x0600B97E RID: 47486 RVA: 0x00284CF8 File Offset: 0x00282EF8 [Token(Token = "0x600B97E")] [Address(RVA = "0x25C9DC0", Offset = "0x25C8DC0", VA = "0x1825C9DC0", Slot = "17")] public virtual void BlockUpdate(byte[] input, int inOff, int len) { if (len > 0) { this.Reset(); } } // Token: 0x0600B97F RID: 47487 RVA: 0x00284D18 File Offset: 0x00282F18 [Token(Token = "0x600B97F")] [Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")] public VmpcMac() { } // Token: 0x04007508 RID: 29960 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007508")] private byte g; // Token: 0x04007509 RID: 29961 [FieldOffset(Offset = "0x11")] [Token(Token = "0x4007509")] private byte n; // Token: 0x0400750A RID: 29962 [FieldOffset(Offset = "0x18")] [Token(Token = "0x400750A")] private byte[] P; // Token: 0x0400750B RID: 29963 [FieldOffset(Offset = "0x20")] [Token(Token = "0x400750B")] private byte s; // Token: 0x0400750C RID: 29964 [FieldOffset(Offset = "0x28")] [Token(Token = "0x400750C")] private byte[] T; // Token: 0x0400750D RID: 29965 [FieldOffset(Offset = "0x30")] [Token(Token = "0x400750D")] private byte[] workingIV; // Token: 0x0400750E RID: 29966 [FieldOffset(Offset = "0x38")] [Token(Token = "0x400750E")] private byte[] workingKey; // Token: 0x0400750F RID: 29967 [FieldOffset(Offset = "0x40")] [Token(Token = "0x400750F")] private byte x1; // Token: 0x04007510 RID: 29968 [FieldOffset(Offset = "0x41")] [Token(Token = "0x4007510")] private byte x2; // Token: 0x04007511 RID: 29969 [FieldOffset(Offset = "0x42")] [Token(Token = "0x4007511")] private byte x3; // Token: 0x04007512 RID: 29970 [FieldOffset(Offset = "0x43")] [Token(Token = "0x4007512")] private byte x4; } }