using System; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs { // Token: 0x02001C4F RID: 7247 [Token(Token = "0x2001C4F")] public class GMac : IMac { // Token: 0x0600B55B RID: 46427 RVA: 0x00279C6C File Offset: 0x00277E6C [Token(Token = "0x600B55B")] [Address(RVA = "0x1C224B0", Offset = "0x1C212B0", VA = "0x181C224B0")] public GMac(GcmBlockCipher cipher) { this.cipher = cipher; this.macSizeBits = (int)((ulong)128L); } // Token: 0x0600B55C RID: 46428 RVA: 0x00279C94 File Offset: 0x00277E94 [Token(Token = "0x600B55C")] [Address(RVA = "0x4F34F0", Offset = "0x4F22F0", VA = "0x1804F34F0")] public GMac(GcmBlockCipher cipher, int macSizeBits) { this.cipher = cipher; this.macSizeBits = macSizeBits; } // Token: 0x0600B55D RID: 46429 RVA: 0x00279CB8 File Offset: 0x00277EB8 [Token(Token = "0x600B55D")] [Address(RVA = "0x1C22220", Offset = "0x1C21020", VA = "0x181C22220", Slot = "4")] public void Init(ICipherParameters parameters) { /* An exception occurred when decompiling this method (0600B55D) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs.GMac::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_21: stloc:ArgumentException(var_6_2B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("GMAC requires ParametersWithIV"))) } 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: 0x17001C90 RID: 7312 // (get) Token: 0x0600B55E RID: 46430 RVA: 0x00279CF4 File Offset: 0x00277EF4 [Token(Token = "0x17001C90")] public string AlgorithmName { [Token(Token = "0x600B55E")] [Address(RVA = "0x1C224E0", Offset = "0x1C212E0", VA = "0x181C224E0", Slot = "5")] get { IBlockCipher blockCipher = this.cipher.cipher; string text; return text; } } // Token: 0x0600B55F RID: 46431 RVA: 0x00279D14 File Offset: 0x00277F14 [Token(Token = "0x600B55F")] [Address(RVA = "0x1C22210", Offset = "0x1C21010", VA = "0x181C22210", Slot = "6")] public int GetMacSize() { return this.macSizeBits; } // Token: 0x0600B560 RID: 46432 RVA: 0x00279D28 File Offset: 0x00277F28 [Token(Token = "0x600B560")] [Address(RVA = "0x1C22410", Offset = "0x1C21210", VA = "0x181C22410", Slot = "7")] public void Update(byte input) { GcmBlockCipher gcmBlockCipher = this.cipher; gcmBlockCipher.CheckStatus(); byte[] atBlock = gcmBlockCipher.atBlock; int atBlockPos = gcmBlockCipher.atBlockPos; int num = gcmBlockCipher.atBlockPos; num++; gcmBlockCipher.atBlockPos = num; if (num == 16) { byte[] atBlock2 = gcmBlockCipher.atBlock; byte[] s_at = gcmBlockCipher.S_at; gcmBlockCipher.gHASHBlock(s_at, atBlock2); gcmBlockCipher.atBlockPos = (int)((ulong)0L); } } // Token: 0x0600B561 RID: 46433 RVA: 0x00279D90 File Offset: 0x00277F90 [Token(Token = "0x600B561")] [Address(RVA = "0x1C22110", Offset = "0x1C20F10", VA = "0x181C22110", Slot = "8")] public void BlockUpdate(byte[] input, int inOff, int len) { this.cipher.ProcessAadBytes(input, inOff, len); } // Token: 0x0600B562 RID: 46434 RVA: 0x00279DB4 File Offset: 0x00277FB4 [Token(Token = "0x600B562")] [Address(RVA = "0x1C22140", Offset = "0x1C20F40", VA = "0x181C22140", Slot = "9")] public int DoFinal(byte[] output, int outOff) { return this.cipher.DoFinal(output, outOff); } // Token: 0x0600B563 RID: 46435 RVA: 0x00279DDC File Offset: 0x00277FDC [Token(Token = "0x600B563")] [Address(RVA = "0x1C223E0", Offset = "0x1C211E0", VA = "0x181C223E0", Slot = "10")] public void Reset() { this.cipher.Reset(true); } // Token: 0x0400730D RID: 29453 [FieldOffset(Offset = "0x10")] [Token(Token = "0x400730D")] private readonly GcmBlockCipher cipher; // Token: 0x0400730E RID: 29454 [FieldOffset(Offset = "0x18")] [Token(Token = "0x400730E")] private readonly int macSizeBits; } }