139 lines
6.8 KiB
C#
139 lines
6.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
// Token: 0x02001601 RID: 5633
|
|
[Token(Token = "0x2001601")]
|
|
[StructLayout(3)]
|
|
public class DHPublicKeyParameters : DHKeyParameters
|
|
{
|
|
// Token: 0x0600968B RID: 38539 RVA: 0x00216AD8 File Offset: 0x00214CD8
|
|
[Token(Token = "0x600968B")]
|
|
[Address(RVA = "0x1DD2300", Offset = "0x1DD0D00", VA = "0x181DD2300")]
|
|
private static BigInteger Validate(BigInteger y, DHParameters dhParams)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600968B)
|
|
|
|
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: 0x0600968C RID: 38540 RVA: 0x00216B58 File Offset: 0x00214D58
|
|
[Token(Token = "0x600968C")]
|
|
[Address(RVA = "0x1DD2510", Offset = "0x1DD0F10", VA = "0x181DD2510")]
|
|
public DHPublicKeyParameters(BigInteger y, DHParameters parameters)
|
|
{
|
|
int num = 0;
|
|
base..ctor(num != 0, parameters);
|
|
BigInteger bigInteger = DHPublicKeyParameters.Validate(y, parameters);
|
|
this.y = bigInteger;
|
|
}
|
|
|
|
// Token: 0x0600968D RID: 38541 RVA: 0x00216B80 File Offset: 0x00214D80
|
|
[Token(Token = "0x600968D")]
|
|
[Address(RVA = "0x1DD2560", Offset = "0x1DD0F60", VA = "0x181DD2560")]
|
|
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: 0x17001805 RID: 6149
|
|
// (get) Token: 0x0600968E RID: 38542 RVA: 0x00216BB4 File Offset: 0x00214DB4
|
|
[Token(Token = "0x17001805")]
|
|
public virtual BigInteger Y
|
|
{
|
|
[Token(Token = "0x600968E")]
|
|
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230", Slot = "4")]
|
|
get
|
|
{
|
|
return this.y;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600968F RID: 38543 RVA: 0x00216BC8 File Offset: 0x00214DC8
|
|
[Token(Token = "0x600968F")]
|
|
[Address(RVA = "0x1DD2200", Offset = "0x1DD0C00", VA = "0x181DD2200", 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: 0x06009690 RID: 38544 RVA: 0x00216C04 File Offset: 0x00214E04
|
|
[Token(Token = "0x6009690")]
|
|
[Address(RVA = "0x1DD2090", Offset = "0x1DD0A90", VA = "0x181DD2090")]
|
|
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: 0x06009691 RID: 38545 RVA: 0x00216C40 File Offset: 0x00214E40
|
|
[Token(Token = "0x6009691")]
|
|
[Address(RVA = "0x1DD2110", Offset = "0x1DD0B10", VA = "0x181DD2110", 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: 0x04006362 RID: 25442
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4006362")]
|
|
private readonly BigInteger y;
|
|
}
|
|
}
|