137 lines
6.7 KiB
C#
137 lines
6.7 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
// Token: 0x02001CBE RID: 7358
|
|
[Token(Token = "0x2001CBE")]
|
|
public class DHPublicKeyParameters : DHKeyParameters
|
|
{
|
|
// Token: 0x0600B633 RID: 46643 RVA: 0x002772B8 File Offset: 0x002754B8
|
|
[Token(Token = "0x600B633")]
|
|
[Address(RVA = "0x22D1880", Offset = "0x22D0880", VA = "0x1822D1880")]
|
|
private static BigInteger Validate(BigInteger y, DHParameters dhParams)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B633)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.DHPublicKeyParameters::Validate(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.DHParameters)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_55:
|
|
stloc:ArgumentNullException(var_9_5F, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("y")))
|
|
stloc:ArgumentException(var_10_70, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("y value does not appear to be in correct group"), ldstr:string("y")))
|
|
}
|
|
|
|
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: 0x0600B634 RID: 46644 RVA: 0x00277338 File Offset: 0x00275538
|
|
[Token(Token = "0x600B634")]
|
|
[Address(RVA = "0x22D1A90", Offset = "0x22D0A90", VA = "0x1822D1A90")]
|
|
public DHPublicKeyParameters(BigInteger y, DHParameters parameters)
|
|
{
|
|
int num = 0;
|
|
base..ctor(num != 0, parameters);
|
|
BigInteger bigInteger = DHPublicKeyParameters.Validate(y, parameters);
|
|
this.y = bigInteger;
|
|
}
|
|
|
|
// Token: 0x0600B635 RID: 46645 RVA: 0x00277360 File Offset: 0x00275560
|
|
[Token(Token = "0x600B635")]
|
|
[Address(RVA = "0x22D1AE0", Offset = "0x22D0AE0", VA = "0x1822D1AE0")]
|
|
public DHPublicKeyParameters(BigInteger y, DHParameters parameters, DerObjectIdentifier algorithmOid)
|
|
{
|
|
int num = 0;
|
|
base..ctor(num != 0);
|
|
this.parameters = parameters;
|
|
this.algorithmOid = algorithmOid;
|
|
BigInteger bigInteger = DHPublicKeyParameters.Validate(y, parameters);
|
|
this.y = bigInteger;
|
|
}
|
|
|
|
// Token: 0x17001CA3 RID: 7331
|
|
// (get) Token: 0x0600B636 RID: 46646 RVA: 0x00277394 File Offset: 0x00275594
|
|
[Token(Token = "0x17001CA3")]
|
|
public virtual BigInteger Y
|
|
{
|
|
[Token(Token = "0x600B636")]
|
|
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0", Slot = "4")]
|
|
get
|
|
{
|
|
return this.y;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B637 RID: 46647 RVA: 0x002773A8 File Offset: 0x002755A8
|
|
[Token(Token = "0x600B637")]
|
|
[Address(RVA = "0x22D1780", Offset = "0x22D0780", VA = "0x1822D1780", Slot = "0")]
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj != this)
|
|
{
|
|
if (obj != 0 && obj != 0)
|
|
{
|
|
BigInteger bigInteger = this.y;
|
|
DHParameters parameters = this.parameters;
|
|
bool flag;
|
|
if (flag)
|
|
{
|
|
bool flag2;
|
|
return flag2;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x0600B638 RID: 46648 RVA: 0x002773E4 File Offset: 0x002755E4
|
|
[Token(Token = "0x600B638")]
|
|
[Address(RVA = "0x22D1610", Offset = "0x22D0610", VA = "0x1822D1610")]
|
|
protected bool Equals(DHPublicKeyParameters other)
|
|
{
|
|
DHParameters parameters;
|
|
do
|
|
{
|
|
BigInteger bigInteger = this.y;
|
|
parameters = other.parameters;
|
|
}
|
|
while (!object.Equals(this.parameters, parameters));
|
|
return base.Equals(other);
|
|
}
|
|
|
|
// Token: 0x0600B639 RID: 46649 RVA: 0x00277420 File Offset: 0x00275620
|
|
[Token(Token = "0x600B639")]
|
|
[Address(RVA = "0x22D1690", Offset = "0x22D0690", VA = "0x1822D1690", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
this.y.Finalize();
|
|
int hashCode = base.GetHashCode();
|
|
DHParameters parameters = this.parameters;
|
|
if (parameters != 0)
|
|
{
|
|
parameters.Finalize();
|
|
}
|
|
return hashCode;
|
|
}
|
|
|
|
// Token: 0x0400735E RID: 29534
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400735E")]
|
|
private readonly BigInteger y;
|
|
}
|
|
}
|