Files
Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Asn1/X509/Time.cs
T
2026-04-10 22:50:51 +02:00

148 lines
8.4 KiB
C#

using System;
using System.Globalization;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509
{
// Token: 0x02001E24 RID: 7716
[Token(Token = "0x2001E24")]
public class Time : Asn1Encodable, IAsn1Choice
{
// Token: 0x0600C35B RID: 50011 RVA: 0x002C7D20 File Offset: 0x002C5F20
[Token(Token = "0x600C35B")]
[Address(RVA = "0x2B42990", Offset = "0x2B41790", VA = "0x182B42990")]
public static Time GetInstance(Asn1TaggedObject obj, bool explicitly)
{
return Time.GetInstance(obj.GetObject());
}
// Token: 0x0600C35C RID: 50012 RVA: 0x002C7D40 File Offset: 0x002C5F40
[Token(Token = "0x600C35C")]
[Address(RVA = "0x2B43030", Offset = "0x2B41E30", VA = "0x182B43030")]
public Time(Asn1Object time)
{
/*
An exception occurred when decompiling this method (0600C35C)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Time::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_29:
stloc:ArgumentException(var_3_33, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("unknown object passed to Time")))
}
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: 0x0600C35D RID: 50013 RVA: 0x002C7D80 File Offset: 0x002C5F80
[Token(Token = "0x600C35D")]
[Address(RVA = "0x2B43160", Offset = "0x2B41F60", VA = "0x182B43160")]
public Time(DateTime date)
{
CultureInfo invariantCulture = CultureInfo.InvariantCulture;
string text2;
string text = text2 + "Z";
int num = 0;
int num2 = int.Parse(text.Substring(num, 4));
num2 += -1950;
if (num2 <= 99)
{
DerUtcTime derUtcTime = new DerUtcTime(text.Substring(2));
this.time = derUtcTime;
return;
}
DerGeneralizedTime derGeneralizedTime = new DerGeneralizedTime(text);
this.time = derGeneralizedTime;
}
// Token: 0x0600C35E RID: 50014 RVA: 0x002C7DF8 File Offset: 0x002C5FF8
[Token(Token = "0x600C35E")]
[Address(RVA = "0x2B429C0", Offset = "0x2B417C0", VA = "0x182B429C0")]
public static Time GetInstance(object obj)
{
/*
An exception occurred when decompiling this method (0600C35E)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Time BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.Time::GetInstance(System.Object)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_34:
stloc:string(var_8_3A, call:string(Platform::GetTypeName, ldloc:object(obj)))
stloc:ArgumentException(var_9_52, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("unknown object in factory: "), ldloc:string(var_8_3A)), ldstr:string("obj")))
}
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: 0x0600C35F RID: 50015 RVA: 0x002C7E58 File Offset: 0x002C6058
[Token(Token = "0x600C35F")]
[Address(RVA = "0x2B42C50", Offset = "0x2B41A50", VA = "0x182B42C50")]
public string GetTime()
{
Asn1Object asn1Object;
do
{
asn1Object = this.time;
}
while ((asn1Object != 0 && asn1Object != 0 && (asn1Object == 0 || asn1Object == 0)) || asn1Object == 0 || asn1Object == 0);
string text;
return text;
}
// Token: 0x0600C360 RID: 50016 RVA: 0x002C7E98 File Offset: 0x002C6098
[Token(Token = "0x600C360")]
[Address(RVA = "0x2B42DF0", Offset = "0x2B41BF0", VA = "0x182B42DF0")]
public DateTime ToDateTime()
{
Asn1Object asn1Object = this.time;
if (asn1Object != 0 && asn1Object != 0 && (asn1Object == 0 || asn1Object == 0))
{
throw new NullReferenceException();
}
if (asn1Object != 0 && asn1Object != 0)
{
DateTime dateTime;
return dateTime;
}
throw new NullReferenceException();
}
// Token: 0x0600C361 RID: 50017 RVA: 0x002C7EF0 File Offset: 0x002C60F0
[Token(Token = "0x600C361")]
[Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20", Slot = "5")]
public override Asn1Object ToAsn1Object()
{
return this.time;
}
// Token: 0x0600C362 RID: 50018 RVA: 0x002C7F04 File Offset: 0x002C6104
[Token(Token = "0x600C362")]
[Address(RVA = "0x2B43020", Offset = "0x2B41E20", VA = "0x182B43020", Slot = "3")]
public override string ToString()
{
return this.GetTime();
}
// Token: 0x04007B17 RID: 31511
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4007B17")]
private readonly Asn1Object time;
}
}