151 lines
8.4 KiB
C#
151 lines
8.4 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
|
|
{
|
|
// Token: 0x02001965 RID: 6501
|
|
[Token(Token = "0x2001965")]
|
|
[StructLayout(3)]
|
|
public class Time : Asn1Encodable, IAsn1Choice
|
|
{
|
|
// Token: 0x0600AE97 RID: 44695 RVA: 0x0028D9BC File Offset: 0x0028BBBC
|
|
[Token(Token = "0x600AE97")]
|
|
[Address(RVA = "0x1EE3DE0", Offset = "0x1EE27E0", VA = "0x181EE3DE0")]
|
|
public static Time GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return Time.GetInstance(obj.GetObject());
|
|
}
|
|
|
|
// Token: 0x0600AE98 RID: 44696 RVA: 0x0028D9DC File Offset: 0x0028BBDC
|
|
[Token(Token = "0x600AE98")]
|
|
[Address(RVA = "0x1EE3F50", Offset = "0x1EE2950", VA = "0x181EE3F50")]
|
|
public Time(Asn1Object time)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE98)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.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: 0x0600AE99 RID: 44697 RVA: 0x0028DA1C File Offset: 0x0028BC1C
|
|
[Token(Token = "0x600AE99")]
|
|
[Address(RVA = "0x1EE3E10", Offset = "0x1EE2810", VA = "0x181EE3E10")]
|
|
public Time(DateTime date)
|
|
{
|
|
CultureInfo invariantCulture = CultureInfo.InvariantCulture;
|
|
int num = 0;
|
|
string text;
|
|
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: 0x0600AE9A RID: 44698 RVA: 0x0028DA88 File Offset: 0x0028BC88
|
|
[Token(Token = "0x600AE9A")]
|
|
[Address(RVA = "0x1EE3B50", Offset = "0x1EE2550", VA = "0x181EE3B50")]
|
|
public static Time GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE9A)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.Time BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.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: 0x17001C0A RID: 7178
|
|
// (get) Token: 0x0600AE9B RID: 44699 RVA: 0x0028DAE8 File Offset: 0x0028BCE8
|
|
[Token(Token = "0x17001C0A")]
|
|
public string TimeString
|
|
{
|
|
[Token(Token = "0x600AE9B")]
|
|
[Address(RVA = "0x1EE42B0", Offset = "0x1EE2CB0", VA = "0x181EE42B0")]
|
|
get
|
|
{
|
|
Asn1Object asn1Object;
|
|
do
|
|
{
|
|
asn1Object = this.time;
|
|
}
|
|
while ((asn1Object != 0 && asn1Object != 0 && (asn1Object == 0 || asn1Object == 0)) || asn1Object == 0 || asn1Object == 0);
|
|
string text;
|
|
return text;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001C0B RID: 7179
|
|
// (get) Token: 0x0600AE9C RID: 44700 RVA: 0x0028DB28 File Offset: 0x0028BD28
|
|
[Token(Token = "0x17001C0B")]
|
|
public DateTime Date
|
|
{
|
|
[Token(Token = "0x600AE9C")]
|
|
[Address(RVA = "0x1EE4080", Offset = "0x1EE2A80", VA = "0x181EE4080")]
|
|
get
|
|
{
|
|
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: 0x0600AE9D RID: 44701 RVA: 0x0028DB80 File Offset: 0x0028BD80
|
|
[Token(Token = "0x600AE9D")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
return this.time;
|
|
}
|
|
|
|
// Token: 0x0400729F RID: 29343
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400729F")]
|
|
private readonly Asn1Object time;
|
|
}
|
|
}
|