224 lines
8.6 KiB
C#
224 lines
8.6 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
|
|
{
|
|
// Token: 0x02001CF5 RID: 7413
|
|
[Token(Token = "0x2001CF5")]
|
|
public class RsaPrivateCrtKeyParameters : RsaKeyParameters
|
|
{
|
|
// Token: 0x0600B758 RID: 46936 RVA: 0x0027A50C File Offset: 0x0027870C
|
|
[Token(Token = "0x600B758")]
|
|
[Address(RVA = "0x22E44C0", Offset = "0x22E34C0", VA = "0x1822E44C0")]
|
|
public RsaPrivateCrtKeyParameters(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger p, BigInteger q, BigInteger dP, BigInteger dQ, BigInteger qInv)
|
|
: base(true, modulus, privateExponent)
|
|
{
|
|
RsaPrivateCrtKeyParameters.ValidateValue(publicExponent, "publicExponent", "exponent");
|
|
this.q = 0;
|
|
this.dP = 0;
|
|
this.dQ = 0;
|
|
this.qInv = 0;
|
|
this.e = publicExponent;
|
|
this.p = 0;
|
|
}
|
|
|
|
// Token: 0x0600B759 RID: 46937 RVA: 0x0027A55C File Offset: 0x0027875C
|
|
[Token(Token = "0x600B759")]
|
|
[Address(RVA = "0x22E4630", Offset = "0x22E3630", VA = "0x1822E4630")]
|
|
public RsaPrivateCrtKeyParameters(RsaPrivateKeyStructure rsaPrivateKey)
|
|
{
|
|
BigInteger prime = rsaPrivateKey.prime2;
|
|
BigInteger prime2 = rsaPrivateKey.prime1;
|
|
BigInteger publicExponent = rsaPrivateKey.publicExponent;
|
|
BigInteger coefficient = rsaPrivateKey.coefficient;
|
|
BigInteger modulus = rsaPrivateKey.modulus;
|
|
BigInteger exponent = rsaPrivateKey.exponent1;
|
|
BigInteger privateExponent = rsaPrivateKey.privateExponent;
|
|
BigInteger exponent2 = rsaPrivateKey.exponent2;
|
|
base..ctor(true, modulus, privateExponent);
|
|
RsaPrivateCrtKeyParameters.ValidateValue(publicExponent, "publicExponent", "exponent");
|
|
RsaPrivateCrtKeyParameters.ValidateValue(prime2, "p", "P value");
|
|
RsaPrivateCrtKeyParameters.ValidateValue(prime, "q", "Q value");
|
|
RsaPrivateCrtKeyParameters.ValidateValue(exponent, "dP", "DP value");
|
|
RsaPrivateCrtKeyParameters.ValidateValue(exponent2, "dQ", "DQ value");
|
|
RsaPrivateCrtKeyParameters.ValidateValue(coefficient, "qInv", "InverseQ value");
|
|
this.e = publicExponent;
|
|
this.p = prime2;
|
|
this.q = prime;
|
|
this.dP = exponent;
|
|
this.dQ = exponent2;
|
|
this.qInv = coefficient;
|
|
}
|
|
|
|
// Token: 0x17001CF4 RID: 7412
|
|
// (get) Token: 0x0600B75A RID: 46938 RVA: 0x0027A644 File Offset: 0x00278844
|
|
[Token(Token = "0x17001CF4")]
|
|
public BigInteger PublicExponent
|
|
{
|
|
[Token(Token = "0x600B75A")]
|
|
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
|
get
|
|
{
|
|
return this.e;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001CF5 RID: 7413
|
|
// (get) Token: 0x0600B75B RID: 46939 RVA: 0x0027A658 File Offset: 0x00278858
|
|
[Token(Token = "0x17001CF5")]
|
|
public BigInteger P
|
|
{
|
|
[Token(Token = "0x600B75B")]
|
|
[Address(RVA = "0x4157E0", Offset = "0x4147E0", VA = "0x1804157E0")]
|
|
get
|
|
{
|
|
return this.p;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001CF6 RID: 7414
|
|
// (get) Token: 0x0600B75C RID: 46940 RVA: 0x0027A66C File Offset: 0x0027886C
|
|
[Token(Token = "0x17001CF6")]
|
|
public BigInteger Q
|
|
{
|
|
[Token(Token = "0x600B75C")]
|
|
[Address(RVA = "0x41CEF0", Offset = "0x41BEF0", VA = "0x18041CEF0")]
|
|
get
|
|
{
|
|
return this.q;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001CF7 RID: 7415
|
|
// (get) Token: 0x0600B75D RID: 46941 RVA: 0x0027A680 File Offset: 0x00278880
|
|
[Token(Token = "0x17001CF7")]
|
|
public BigInteger DP
|
|
{
|
|
[Token(Token = "0x600B75D")]
|
|
[Address(RVA = "0x417680", Offset = "0x416680", VA = "0x180417680")]
|
|
get
|
|
{
|
|
return this.dP;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001CF8 RID: 7416
|
|
// (get) Token: 0x0600B75E RID: 46942 RVA: 0x0027A694 File Offset: 0x00278894
|
|
[Token(Token = "0x17001CF8")]
|
|
public BigInteger DQ
|
|
{
|
|
[Token(Token = "0x600B75E")]
|
|
[Address(RVA = "0x4975A0", Offset = "0x4965A0", VA = "0x1804975A0")]
|
|
get
|
|
{
|
|
return this.dQ;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001CF9 RID: 7417
|
|
// (get) Token: 0x0600B75F RID: 46943 RVA: 0x0027A6A8 File Offset: 0x002788A8
|
|
[Token(Token = "0x17001CF9")]
|
|
public BigInteger QInv
|
|
{
|
|
[Token(Token = "0x600B75F")]
|
|
[Address(RVA = "0x4936E0", Offset = "0x4926E0", VA = "0x1804936E0")]
|
|
get
|
|
{
|
|
return this.qInv;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B760 RID: 46944 RVA: 0x0027A6BC File Offset: 0x002788BC
|
|
[Token(Token = "0x600B760")]
|
|
[Address(RVA = "0x22E40C0", Offset = "0x22E30C0", VA = "0x1822E40C0", Slot = "0")]
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj != this)
|
|
{
|
|
if (obj != 0)
|
|
{
|
|
int num = 0;
|
|
if (obj == 0 || num == 0 || num == 0 || num == 0 || num == 0 || num == 0 || num == 0 || num != 0)
|
|
{
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
// Token: 0x0600B761 RID: 46945 RVA: 0x0027A6FC File Offset: 0x002788FC
|
|
[Token(Token = "0x600B761")]
|
|
[Address(RVA = "0x22E42B0", Offset = "0x22E32B0", VA = "0x1822E42B0", Slot = "2")]
|
|
public override int GetHashCode()
|
|
{
|
|
this.dP.Finalize();
|
|
this.dQ.Finalize();
|
|
this.exponent.Finalize();
|
|
this.modulus.Finalize();
|
|
this.p.Finalize();
|
|
this.q.Finalize();
|
|
this.e.Finalize();
|
|
this.qInv.Finalize();
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600B762 RID: 46946 RVA: 0x0027A768 File Offset: 0x00278968
|
|
[Token(Token = "0x600B762")]
|
|
[Address(RVA = "0x22E4400", Offset = "0x22E3400", VA = "0x1822E4400")]
|
|
private static void ValidateValue(BigInteger x, string name, string desc)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B762)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.RsaPrivateCrtKeyParameters::ValidateValue(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,System.String,System.String)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_20:
|
|
stloc:ArgumentNullException(var_1_26, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldloc:string(name)))
|
|
}
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x040073D0 RID: 29648
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40073D0")]
|
|
private readonly BigInteger e;
|
|
|
|
// Token: 0x040073D1 RID: 29649
|
|
[FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x40073D1")]
|
|
private readonly BigInteger p;
|
|
|
|
// Token: 0x040073D2 RID: 29650
|
|
[FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x40073D2")]
|
|
private readonly BigInteger q;
|
|
|
|
// Token: 0x040073D3 RID: 29651
|
|
[FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x40073D3")]
|
|
private readonly BigInteger dP;
|
|
|
|
// Token: 0x040073D4 RID: 29652
|
|
[FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x40073D4")]
|
|
private readonly BigInteger dQ;
|
|
|
|
// Token: 0x040073D5 RID: 29653
|
|
[FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x40073D5")]
|
|
private readonly BigInteger qInv;
|
|
}
|
|
}
|