Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Asn1/X509/RsaPublicKeyStructure.cs
T
2026-04-08 23:40:05 +02:00

146 lines
8.6 KiB
C#

using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
{
// Token: 0x02001838 RID: 6200
[Token(Token = "0x2001838")]
[StructLayout(3)]
public class RsaPublicKeyStructure : Asn1Encodable
{
// Token: 0x0600A71B RID: 42779 RVA: 0x0026E338 File Offset: 0x0026C538
[Token(Token = "0x600A71B")]
[Address(RVA = "0x2B114D0", Offset = "0x2B0FED0", VA = "0x182B114D0")]
public static RsaPublicKeyStructure GetInstance(Asn1TaggedObject obj, bool explicitly)
{
return RsaPublicKeyStructure.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
}
// Token: 0x0600A71C RID: 42780 RVA: 0x0026E354 File Offset: 0x0026C554
[Token(Token = "0x600A71C")]
[Address(RVA = "0x2B111D0", Offset = "0x2B0FBD0", VA = "0x182B111D0")]
public static RsaPublicKeyStructure GetInstance(object obj)
{
/*
An exception occurred when decompiling this method (0600A71C)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.RsaPublicKeyStructure BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.RsaPublicKeyStructure::GetInstance(System.Object)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_4B:
stloc:string(var_11_51, call:string(Platform::GetTypeName, ldloc:object(obj)))
stloc:ArgumentException(var_12_64, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid RsaPublicKeyStructure: "), ldloc:string(var_11_51))))
}
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: 0x0600A71D RID: 42781 RVA: 0x0026E3C8 File Offset: 0x0026C5C8
[Token(Token = "0x600A71D")]
[Address(RVA = "0x2B11650", Offset = "0x2B10050", VA = "0x182B11650")]
public RsaPublicKeyStructure(BigInteger modulus, BigInteger publicExponent)
{
/*
An exception occurred when decompiling this method (0600A71D)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.RsaPublicKeyStructure::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_3A:
stloc:ArgumentException(var_1_49, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Not a valid RSA public exponent"), ldstr:string("publicExponent")))
}
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: 0x0600A71E RID: 42782 RVA: 0x0026E420 File Offset: 0x0026C620
[Token(Token = "0x600A71E")]
[Address(RVA = "0x2B117A0", Offset = "0x2B101A0", VA = "0x182B117A0")]
private RsaPublicKeyStructure(Asn1Sequence seq)
{
Asn1SequenceParser parser = seq.Parser;
DerInteger derInteger;
BigInteger positiveValue = derInteger.PositiveValue;
this.modulus = positiveValue;
Asn1SequenceParser parser2 = seq.Parser;
DerInteger derInteger2;
BigInteger positiveValue2 = derInteger2.PositiveValue;
this.publicExponent = positiveValue2;
}
// Token: 0x17001A2A RID: 6698
// (get) Token: 0x0600A71F RID: 42783 RVA: 0x0026E468 File Offset: 0x0026C668
[Token(Token = "0x17001A2A")]
public BigInteger Modulus
{
[Token(Token = "0x600A71F")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
get
{
return this.modulus;
}
}
// Token: 0x17001A2B RID: 6699
// (get) Token: 0x0600A720 RID: 42784 RVA: 0x0026E47C File Offset: 0x0026C67C
[Token(Token = "0x17001A2B")]
public BigInteger PublicExponent
{
[Token(Token = "0x600A720")]
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
get
{
return this.publicExponent;
}
}
// Token: 0x0600A721 RID: 42785 RVA: 0x0026E490 File Offset: 0x0026C690
[Token(Token = "0x600A721")]
[Address(RVA = "0x2B114F0", Offset = "0x2B0FEF0", VA = "0x182B114F0", Slot = "5")]
public override Asn1Object ToAsn1Object()
{
Asn1Encodable[] array = new Asn1Encodable[2];
DerInteger derInteger = new DerInteger(this.modulus);
if (derInteger != 0)
{
}
array[0] = derInteger;
DerInteger derInteger2 = new DerInteger(this.publicExponent);
if (derInteger2 != 0)
{
}
array[1] = derInteger2;
DerSequence derSequence = new DerSequence(array);
throw new NullReferenceException();
}
// Token: 0x04006CA2 RID: 27810
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006CA2")]
private BigInteger modulus;
// Token: 0x04006CA3 RID: 27811
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006CA3")]
private BigInteger publicExponent;
}
}