75 lines
4.4 KiB
C#
75 lines
4.4 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement
|
|
{
|
|
// Token: 0x02001DE8 RID: 7656
|
|
[Token(Token = "0x2001DE8")]
|
|
public class ECDHBasicAgreement : IBasicAgreement
|
|
{
|
|
// Token: 0x0600C00B RID: 49163 RVA: 0x002B5028 File Offset: 0x002B3228
|
|
[Token(Token = "0x600C00B")]
|
|
[Address(RVA = "0x292C8B0", Offset = "0x292B8B0", VA = "0x18292C8B0", Slot = "7")]
|
|
public virtual void Init(ICipherParameters parameters)
|
|
{
|
|
int num;
|
|
do
|
|
{
|
|
num = 0;
|
|
}
|
|
while (parameters != 0 && ((parameters != 0 && (parameters == 0 || parameters == 0)) || (parameters != 0 && parameters == 0)));
|
|
this.privKey = num;
|
|
}
|
|
|
|
// Token: 0x0600C00C RID: 49164 RVA: 0x002B5060 File Offset: 0x002B3260
|
|
[Token(Token = "0x600C00C")]
|
|
[Address(RVA = "0x292C860", Offset = "0x292B860", VA = "0x18292C860", Slot = "8")]
|
|
public virtual int GetFieldSize()
|
|
{
|
|
string text = this.privKey.parameters.curve.ToString();
|
|
text += 0;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600C00D RID: 49165 RVA: 0x002B508C File Offset: 0x002B328C
|
|
[Token(Token = "0x600C00D")]
|
|
[Address(RVA = "0x292C570", Offset = "0x292B570", VA = "0x18292C570", Slot = "9")]
|
|
public virtual BigInteger CalculateAgreement(ICipherParameters pubKey)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C00D)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Agreement.ECDHBasicAgreement::CalculateAgreement(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_83:
|
|
stloc:InvalidOperationException(var_14_8D, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Infinity is not a valid public key for ECDH")))
|
|
}
|
|
|
|
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: 0x0600C00E RID: 49166 RVA: 0x002B5128 File Offset: 0x002B3328
|
|
[Token(Token = "0x600C00E")]
|
|
[Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")]
|
|
public ECDHBasicAgreement()
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400797D RID: 31101
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400797D")]
|
|
protected internal ECPrivateKeyParameters privKey;
|
|
}
|
|
}
|