252 lines
13 KiB
C#
252 lines
13 KiB
C#
using System;
|
|
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: 0x02001BE9 RID: 7145
|
|
[Token(Token = "0x2001BE9")]
|
|
public class ECDomainParameters
|
|
{
|
|
// Token: 0x0600B2AD RID: 45741 RVA: 0x0026ED64 File Offset: 0x0026CF64
|
|
[Token(Token = "0x600B2AD")]
|
|
[Address(RVA = "0x18066C0", Offset = "0x18054C0", VA = "0x1818066C0")]
|
|
public ECDomainParameters(ECCurve curve, ECPoint g, BigInteger n)
|
|
{
|
|
BigInteger one = BigInteger.One;
|
|
}
|
|
|
|
// Token: 0x0600B2AE RID: 45742 RVA: 0x0026ED7C File Offset: 0x0026CF7C
|
|
[Token(Token = "0x600B2AE")]
|
|
[Address(RVA = "0x1806530", Offset = "0x1805330", VA = "0x181806530")]
|
|
public ECDomainParameters(ECCurve curve, ECPoint g, BigInteger n, BigInteger h)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0600B2AF RID: 45743 RVA: 0x0026ED8C File Offset: 0x0026CF8C
|
|
[Token(Token = "0x600B2AF")]
|
|
[Address(RVA = "0x1806560", Offset = "0x1805360", VA = "0x181806560")]
|
|
public ECDomainParameters(ECCurve curve, ECPoint g, BigInteger n, BigInteger h, byte[] seed)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B2AF)
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x17001C17 RID: 7191
|
|
// (get) Token: 0x0600B2B0 RID: 45744 RVA: 0x0026EDEC File Offset: 0x0026CFEC
|
|
[Token(Token = "0x17001C17")]
|
|
public ECCurve Curve
|
|
{
|
|
[Token(Token = "0x600B2B0")]
|
|
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")]
|
|
get
|
|
{
|
|
return this.curve;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001C18 RID: 7192
|
|
// (get) Token: 0x0600B2B1 RID: 45745 RVA: 0x0026EE00 File Offset: 0x0026D000
|
|
[Token(Token = "0x17001C18")]
|
|
public ECPoint G
|
|
{
|
|
[Token(Token = "0x600B2B1")]
|
|
[Address(RVA = "0x3F6400", Offset = "0x3F5200", VA = "0x1803F6400")]
|
|
get
|
|
{
|
|
return this.g;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001C19 RID: 7193
|
|
// (get) Token: 0x0600B2B2 RID: 45746 RVA: 0x0026EE14 File Offset: 0x0026D014
|
|
[Token(Token = "0x17001C19")]
|
|
public BigInteger N
|
|
{
|
|
[Token(Token = "0x600B2B2")]
|
|
[Address(RVA = "0x3F63E0", Offset = "0x3F51E0", VA = "0x1803F63E0")]
|
|
get
|
|
{
|
|
return this.n;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001C1A RID: 7194
|
|
// (get) Token: 0x0600B2B3 RID: 45747 RVA: 0x0026EE28 File Offset: 0x0026D028
|
|
[Token(Token = "0x17001C1A")]
|
|
public BigInteger H
|
|
{
|
|
[Token(Token = "0x600B2B3")]
|
|
[Address(RVA = "0x3FA180", Offset = "0x3F8F80", VA = "0x1803FA180")]
|
|
get
|
|
{
|
|
return this.h;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001C1B RID: 7195
|
|
// (get) Token: 0x0600B2B4 RID: 45748 RVA: 0x0026EE3C File Offset: 0x0026D03C
|
|
[Token(Token = "0x17001C1B")]
|
|
public BigInteger HInv
|
|
{
|
|
[Token(Token = "0x600B2B4")]
|
|
[Address(RVA = "0x1806770", Offset = "0x1805570", VA = "0x181806770")]
|
|
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 == 0)
|
|
{
|
|
return bigInteger;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B2B5 RID: 45749 RVA: 0x0026EE88 File Offset: 0x0026D088
|
|
[Token(Token = "0x600B2B5")]
|
|
[Address(RVA = "0x1806380", Offset = "0x1805180", VA = "0x181806380")]
|
|
public byte[] GetSeed()
|
|
{
|
|
return Arrays.Clone(this.seed);
|
|
}
|
|
|
|
// Token: 0x0600B2B6 RID: 45750 RVA: 0x0026EEA0 File Offset: 0x0026D0A0
|
|
[Token(Token = "0x600B2B6")]
|
|
[Address(RVA = "0x1806210", Offset = "0x1805010", VA = "0x181806210", Slot = "0")]
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj != this)
|
|
{
|
|
if (obj == 0 || obj != 0)
|
|
{
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x0600B2B7 RID: 45751 RVA: 0x0026EEC0 File Offset: 0x0026D0C0
|
|
[Token(Token = "0x600B2B7")]
|
|
[Address(RVA = "0x1806150", Offset = "0x1804F50", VA = "0x181806150", 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: 0x0600B2B8 RID: 45752 RVA: 0x0026EEF8 File Offset: 0x0026D0F8
|
|
[Token(Token = "0x600B2B8")]
|
|
[Address(RVA = "0x18062C0", Offset = "0x18050C0", VA = "0x1818062C0", 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: 0x0600B2B9 RID: 45753 RVA: 0x0026EF3C File Offset: 0x0026D13C
|
|
[Token(Token = "0x600B2B9")]
|
|
[Address(RVA = "0x18063E0", Offset = "0x18051E0", VA = "0x1818063E0")]
|
|
internal static ECPoint Validate(ECCurve c, ECPoint q)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B2B9)
|
|
|
|
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 1660
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x040071BE RID: 29118
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40071BE")]
|
|
internal ECCurve curve;
|
|
|
|
// Token: 0x040071BF RID: 29119
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40071BF")]
|
|
internal byte[] seed;
|
|
|
|
// Token: 0x040071C0 RID: 29120
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40071C0")]
|
|
internal ECPoint g;
|
|
|
|
// Token: 0x040071C1 RID: 29121
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40071C1")]
|
|
internal BigInteger n;
|
|
|
|
// Token: 0x040071C2 RID: 29122
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40071C2")]
|
|
internal BigInteger h;
|
|
|
|
// Token: 0x040071C3 RID: 29123
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40071C3")]
|
|
internal BigInteger hInv;
|
|
}
|
|
}
|