134 lines
6.4 KiB
C#
134 lines
6.4 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
// Token: 0x0200160A RID: 5642
|
|
[Token(Token = "0x200160A")]
|
|
[StructLayout(3)]
|
|
public class DsaPublicKeyParameters : DsaKeyParameters
|
|
{
|
|
// Token: 0x060096C5 RID: 38597 RVA: 0x0021745C File Offset: 0x0021565C
|
|
[Token(Token = "0x60096C5")]
|
|
[Address(RVA = "0x1DD4DE0", Offset = "0x1DD37E0", VA = "0x181DD4DE0")]
|
|
private static BigInteger Validate(BigInteger y, DsaParameters parameters)
|
|
{
|
|
if (parameters != 0)
|
|
{
|
|
BigInteger two = BigInteger.Two;
|
|
int num = y.CompareTo(two);
|
|
BigInteger p = parameters.p;
|
|
BigInteger two2 = BigInteger.Two;
|
|
BigInteger bigInteger = p.Subtract(two2);
|
|
int num2 = y.CompareTo(bigInteger);
|
|
BigInteger p2 = parameters.p;
|
|
BigInteger q = parameters.q;
|
|
BigInteger bigInteger2 = y.ModPow(q, p2);
|
|
}
|
|
return y;
|
|
}
|
|
|
|
// Token: 0x060096C6 RID: 38598 RVA: 0x002174C4 File Offset: 0x002156C4
|
|
[Token(Token = "0x60096C6")]
|
|
[Address(RVA = "0x1DD4F80", Offset = "0x1DD3980", VA = "0x181DD4F80")]
|
|
public DsaPublicKeyParameters(BigInteger y, DsaParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060096C6)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.DsaPublicKeyParameters::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.DsaParameters)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_6C:
|
|
stloc:ArgumentNullException(var_10_76, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("y")))
|
|
stloc:ArgumentException(var_11_82, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("y value does not appear to be in correct group")))
|
|
}
|
|
|
|
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.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: 0x17001813 RID: 6163
|
|
// (get) Token: 0x060096C7 RID: 38599 RVA: 0x00217554 File Offset: 0x00215754
|
|
[Token(Token = "0x17001813")]
|
|
public BigInteger Y
|
|
{
|
|
[Token(Token = "0x60096C7")]
|
|
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
|
get
|
|
{
|
|
return this.y;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060096C8 RID: 38600 RVA: 0x00217568 File Offset: 0x00215768
|
|
[Token(Token = "0x60096C8")]
|
|
[Address(RVA = "0x1DD4CE0", Offset = "0x1DD36E0", VA = "0x181DD4CE0", Slot = "0")]
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj != this)
|
|
{
|
|
if (obj != 0 && obj != 0)
|
|
{
|
|
BigInteger bigInteger = this.y;
|
|
DsaParameters parameters = this.parameters;
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
bool flag2;
|
|
return flag2;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x060096C9 RID: 38601 RVA: 0x002175A4 File Offset: 0x002157A4
|
|
[Token(Token = "0x60096C9")]
|
|
[Address(RVA = "0x1DD4B60", Offset = "0x1DD3560", VA = "0x181DD4B60")]
|
|
protected bool Equals(DsaPublicKeyParameters other)
|
|
{
|
|
DsaParameters parameters;
|
|
do
|
|
{
|
|
BigInteger bigInteger = this.y;
|
|
parameters = other.parameters;
|
|
}
|
|
while (!object.Equals(this.parameters, parameters));
|
|
return base.Equals(other);
|
|
}
|
|
|
|
// Token: 0x060096CA RID: 38602 RVA: 0x002175E0 File Offset: 0x002157E0
|
|
[Token(Token = "0x60096CA")]
|
|
[Address(RVA = "0x1DD4BE0", Offset = "0x1DD35E0", VA = "0x181DD4BE0", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
this.y.Finalize();
|
|
int hashCode = base.GetHashCode();
|
|
DsaParameters parameters = this.parameters;
|
|
if (parameters != 0)
|
|
{
|
|
parameters.Finalize();
|
|
}
|
|
return hashCode;
|
|
}
|
|
|
|
// Token: 0x04006377 RID: 25463
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006377")]
|
|
private readonly BigInteger y;
|
|
}
|
|
}
|