257 lines
13 KiB
C#
257 lines
13 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Threading;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
// Token: 0x0200160C RID: 5644
|
|
[Token(Token = "0x200160C")]
|
|
[StructLayout(3)]
|
|
public class ECDomainParameters
|
|
{
|
|
// Token: 0x060096D3 RID: 38611 RVA: 0x00217744 File Offset: 0x00215944
|
|
[Token(Token = "0x60096D3")]
|
|
[Address(RVA = "0x1DD5AE0", Offset = "0x1DD44E0", VA = "0x181DD5AE0")]
|
|
public ECDomainParameters(ECCurve curve, ECPoint g, BigInteger n)
|
|
{
|
|
BigInteger one = BigInteger.One;
|
|
}
|
|
|
|
// Token: 0x060096D4 RID: 38612 RVA: 0x0021775C File Offset: 0x0021595C
|
|
[Token(Token = "0x60096D4")]
|
|
[Address(RVA = "0x1DD5950", Offset = "0x1DD4350", VA = "0x181DD5950")]
|
|
public ECDomainParameters(ECCurve curve, ECPoint g, BigInteger n, BigInteger h)
|
|
{
|
|
}
|
|
|
|
// Token: 0x060096D5 RID: 38613 RVA: 0x0021776C File Offset: 0x0021596C
|
|
[Token(Token = "0x60096D5")]
|
|
[Address(RVA = "0x1DD5980", Offset = "0x1DD4380", VA = "0x181DD5980")]
|
|
public ECDomainParameters(ECCurve curve, ECPoint g, BigInteger n, BigInteger h, byte[] seed)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060096D5)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.ECDomainParameters::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECCurve,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_49:
|
|
stloc:ArgumentNullException(var_3_53, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("g")))
|
|
}
|
|
|
|
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: 0x17001816 RID: 6166
|
|
// (get) Token: 0x060096D6 RID: 38614 RVA: 0x002177CC File Offset: 0x002159CC
|
|
[Token(Token = "0x17001816")]
|
|
public ECCurve Curve
|
|
{
|
|
[Token(Token = "0x60096D6")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
|
get
|
|
{
|
|
return this.curve;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001817 RID: 6167
|
|
// (get) Token: 0x060096D7 RID: 38615 RVA: 0x002177E0 File Offset: 0x002159E0
|
|
[Token(Token = "0x17001817")]
|
|
public ECPoint G
|
|
{
|
|
[Token(Token = "0x60096D7")]
|
|
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
|
get
|
|
{
|
|
return this.g;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001818 RID: 6168
|
|
// (get) Token: 0x060096D8 RID: 38616 RVA: 0x002177F4 File Offset: 0x002159F4
|
|
[Token(Token = "0x17001818")]
|
|
public BigInteger N
|
|
{
|
|
[Token(Token = "0x60096D8")]
|
|
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
|
get
|
|
{
|
|
return this.n;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001819 RID: 6169
|
|
// (get) Token: 0x060096D9 RID: 38617 RVA: 0x00217808 File Offset: 0x00215A08
|
|
[Token(Token = "0x17001819")]
|
|
public BigInteger H
|
|
{
|
|
[Token(Token = "0x60096D9")]
|
|
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
|
|
get
|
|
{
|
|
return this.h;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700181A RID: 6170
|
|
// (get) Token: 0x060096DA RID: 38618 RVA: 0x0021781C File Offset: 0x00215A1C
|
|
[Token(Token = "0x1700181A")]
|
|
public BigInteger HInv
|
|
{
|
|
[Token(Token = "0x60096DA")]
|
|
[Address(RVA = "0x1DD5B90", Offset = "0x1DD4590", VA = "0x181DD5B90")]
|
|
get
|
|
{
|
|
int num = 0;
|
|
BigInteger bigInteger = this.hInv;
|
|
if (bigInteger == 0)
|
|
{
|
|
BigInteger bigInteger2 = this.h;
|
|
BigInteger bigInteger3 = this.n;
|
|
BigInteger bigInteger4 = bigInteger2.ModInverse(bigInteger3);
|
|
this.hInv = bigInteger4;
|
|
}
|
|
Monitor.Exit(this);
|
|
if (num != -1)
|
|
{
|
|
}
|
|
if (num == 0)
|
|
{
|
|
return bigInteger;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x060096DB RID: 38619 RVA: 0x0021786C File Offset: 0x00215A6C
|
|
[Token(Token = "0x60096DB")]
|
|
[Address(RVA = "0x1DD57A0", Offset = "0x1DD41A0", VA = "0x181DD57A0")]
|
|
public byte[] GetSeed()
|
|
{
|
|
return Arrays.Clone(this.seed);
|
|
}
|
|
|
|
// Token: 0x060096DC RID: 38620 RVA: 0x00217884 File Offset: 0x00215A84
|
|
[Token(Token = "0x60096DC")]
|
|
[Address(RVA = "0x1DD5630", Offset = "0x1DD4030", VA = "0x181DD5630", Slot = "0")]
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj != this)
|
|
{
|
|
if (obj == 0 || obj != 0)
|
|
{
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x060096DD RID: 38621 RVA: 0x002178A4 File Offset: 0x00215AA4
|
|
[Token(Token = "0x60096DD")]
|
|
[Address(RVA = "0x1DD5570", Offset = "0x1DD3F70", VA = "0x181DD5570", Slot = "4")]
|
|
protected virtual bool Equals(ECDomainParameters other)
|
|
{
|
|
ECCurve eccurve = this.curve;
|
|
ECPoint ecpoint = this.g;
|
|
ECPoint ecpoint2;
|
|
if (ecpoint2 != 0)
|
|
{
|
|
BigInteger bigInteger = this.n;
|
|
BigInteger bigInteger2 = this.h;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x060096DE RID: 38622 RVA: 0x002178DC File Offset: 0x00215ADC
|
|
[Token(Token = "0x60096DE")]
|
|
[Address(RVA = "0x1DD56E0", Offset = "0x1DD40E0", VA = "0x181DD56E0", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
this.curve.Finalize();
|
|
this.g.Finalize();
|
|
this.n.Finalize();
|
|
this.h.Finalize();
|
|
long num2;
|
|
long num = num2 * (long)((uint)37);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x060096DF RID: 38623 RVA: 0x00217920 File Offset: 0x00215B20
|
|
[Token(Token = "0x60096DF")]
|
|
[Address(RVA = "0x1DD5800", Offset = "0x1DD4200", VA = "0x181DD5800")]
|
|
internal static ECPoint Validate(ECCurve c, ECPoint q)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060096DF)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.ECDomainParameters::Validate(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECCurve,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.ECPoint)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_2B:
|
|
stloc:ArgumentException(var_4_3A, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Point not on curve"), ldstr:string("q")))
|
|
}
|
|
|
|
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: 0x0400637B RID: 25467
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400637B")]
|
|
internal ECCurve curve;
|
|
|
|
// Token: 0x0400637C RID: 25468
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400637C")]
|
|
internal byte[] seed;
|
|
|
|
// Token: 0x0400637D RID: 25469
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400637D")]
|
|
internal ECPoint g;
|
|
|
|
// Token: 0x0400637E RID: 25470
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400637E")]
|
|
internal BigInteger n;
|
|
|
|
// Token: 0x0400637F RID: 25471
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x400637F")]
|
|
internal BigInteger h;
|
|
|
|
// Token: 0x04006380 RID: 25472
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4006380")]
|
|
internal BigInteger hInv;
|
|
}
|
|
}
|