using System; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1; using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement.Kdf; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters; using BestHTTP.SecureProtocol.Org.BouncyCastle.Math; using BestHTTP.SecureProtocol.Org.BouncyCastle.Security; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement { // Token: 0x02001D0C RID: 7436 [Token(Token = "0x2001D0C")] public class ECMqvWithKdfBasicAgreement : ECMqvBasicAgreement { // Token: 0x0600BC4D RID: 48205 RVA: 0x002ACC28 File Offset: 0x002AAE28 [Token(Token = "0x600BC4D")] [Address(RVA = "0x200A2A0", Offset = "0x20090A0", VA = "0x18200A2A0")] public ECMqvWithKdfBasicAgreement(string algorithm, IDerivationFunction kdf) { /* An exception occurred when decompiling this method (0600BC4D) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement.ECMqvWithKdfBasicAgreement::.ctor(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IDerivationFunction) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_28: stloc:ArgumentNullException(var_1_32, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("kdf"))) } 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: 0x0600BC4E RID: 48206 RVA: 0x002ACC68 File Offset: 0x002AAE68 [Token(Token = "0x600BC4E")] [Address(RVA = "0x200A0D0", Offset = "0x2008ED0", VA = "0x18200A0D0", Slot = "9")] public override BigInteger CalculateAgreement(ICipherParameters pubKey) { BigInteger bigInteger = base.CalculateAgreement(pubKey); int defaultKeySize = GeneratorUtilities.GetDefaultKeySize(this.algorithm); DerObjectIdentifier derObjectIdentifier = new DerObjectIdentifier(this.algorithm); MqvPrivateParameters privParams = this.privParams; string text = privParams.ToString(); ECPrivateKeyParameters staticPrivateKey = privParams.staticPrivateKey; int num; byte[] array = X9IntegerConverter.IntegerToBytes(bigInteger, num); DHKdfParameters dhkdfParameters = new DHKdfParameters(derObjectIdentifier, defaultKeySize, array); IDerivationFunction derivationFunction = this.kdf; byte[] array2 = new byte[0]; IDerivationFunction derivationFunction2 = this.kdf; int length = array2.Length; return new BigInteger(1, array2); } // Token: 0x0600BC4F RID: 48207 RVA: 0x002ACCF0 File Offset: 0x002AAEF0 [Token(Token = "0x600BC4F")] [Address(RVA = "0x200A070", Offset = "0x2008E70", VA = "0x18200A070")] private byte[] BigIntToBytes(BigInteger r) { MqvPrivateParameters privParams = this.privParams; string text = privParams.ToString(); ECPrivateKeyParameters staticPrivateKey = privParams.staticPrivateKey; int num; return X9IntegerConverter.IntegerToBytes(r, num); } // Token: 0x040077C9 RID: 30665 [FieldOffset(Offset = "0x18")] [Token(Token = "0x40077C9")] private readonly string algorithm; // Token: 0x040077CA RID: 30666 [FieldOffset(Offset = "0x20")] [Token(Token = "0x40077CA")] private readonly IDerivationFunction kdf; } }