132 lines
6.3 KiB
C#
132 lines
6.3 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
// Token: 0x02001CC7 RID: 7367
|
|
[Token(Token = "0x2001CC7")]
|
|
public class DsaPublicKeyParameters : DsaKeyParameters
|
|
{
|
|
// Token: 0x0600B66D RID: 46701 RVA: 0x00277C3C File Offset: 0x00275E3C
|
|
[Token(Token = "0x600B66D")]
|
|
[Address(RVA = "0x22D3A60", Offset = "0x22D2A60", VA = "0x1822D3A60")]
|
|
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: 0x0600B66E RID: 46702 RVA: 0x00277CA4 File Offset: 0x00275EA4
|
|
[Token(Token = "0x600B66E")]
|
|
[Address(RVA = "0x22D3C00", Offset = "0x22D2C00", VA = "0x1822D3C00")]
|
|
public DsaPublicKeyParameters(BigInteger y, DsaParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B66E)
|
|
|
|
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: 0x17001CB1 RID: 7345
|
|
// (get) Token: 0x0600B66F RID: 46703 RVA: 0x00277D34 File Offset: 0x00275F34
|
|
[Token(Token = "0x17001CB1")]
|
|
public BigInteger Y
|
|
{
|
|
[Token(Token = "0x600B66F")]
|
|
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
|
|
get
|
|
{
|
|
return this.y;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B670 RID: 46704 RVA: 0x00277D48 File Offset: 0x00275F48
|
|
[Token(Token = "0x600B670")]
|
|
[Address(RVA = "0x22D3960", Offset = "0x22D2960", VA = "0x1822D3960", 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: 0x0600B671 RID: 46705 RVA: 0x00277D84 File Offset: 0x00275F84
|
|
[Token(Token = "0x600B671")]
|
|
[Address(RVA = "0x22D37E0", Offset = "0x22D27E0", VA = "0x1822D37E0")]
|
|
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: 0x0600B672 RID: 46706 RVA: 0x00277DC0 File Offset: 0x00275FC0
|
|
[Token(Token = "0x600B672")]
|
|
[Address(RVA = "0x22D3860", Offset = "0x22D2860", VA = "0x1822D3860", 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: 0x04007373 RID: 29555
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007373")]
|
|
private readonly BigInteger y;
|
|
}
|
|
}
|