Files
2026-04-08 23:40:05 +02:00

302 lines
13 KiB
C#

using System;
using System.Globalization;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1
{
// Token: 0x020017D9 RID: 6105
[Token(Token = "0x20017D9")]
[StructLayout(3)]
public class DerUtcTime : Asn1Object
{
// Token: 0x0600A4DA RID: 42202 RVA: 0x00265674 File Offset: 0x00263874
[Token(Token = "0x600A4DA")]
[Address(RVA = "0x1DEAE30", Offset = "0x1DE9830", VA = "0x181DEAE30")]
public static DerUtcTime GetInstance(object obj)
{
/*
An exception occurred when decompiling this method (0600A4DA)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerUtcTime BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerUtcTime::GetInstance(System.Object)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_16:
stloc:string(var_3_1C, call:string(Platform::GetTypeName, ldloc:object(obj)))
stloc:ArgumentException(var_4_2D, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("illegal object in GetInstance: "), ldloc:string(var_3_1C))))
}
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: 0x0600A4DB RID: 42203 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600A4DB")]
[Address(RVA = "0x1DEAF60", Offset = "0x1DE9960", VA = "0x181DEAF60")]
public static DerUtcTime GetInstance(Asn1TaggedObject obj, bool isExplicit)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600A4DC RID: 42204 RVA: 0x002656B0 File Offset: 0x002638B0
[Token(Token = "0x600A4DC")]
[Address(RVA = "0x1DEB2B0", Offset = "0x1DE9CB0", VA = "0x181DEB2B0")]
public DerUtcTime(string time)
{
/*
An exception occurred when decompiling this method (0600A4DC)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerUtcTime::.ctor(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_33:
stloc:ArgumentNullException(var_4_3D, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("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.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: 0x0600A4DD RID: 42205 RVA: 0x002656FC File Offset: 0x002638FC
[Token(Token = "0x600A4DD")]
[Address(RVA = "0x1DEB3E0", Offset = "0x1DE9DE0", VA = "0x181DEB3E0")]
public DerUtcTime(DateTime time)
{
CultureInfo invariantCulture = CultureInfo.InvariantCulture;
string text;
this.time = text;
}
// Token: 0x0600A4DE RID: 42206 RVA: 0x00265720 File Offset: 0x00263920
[Token(Token = "0x600A4DE")]
[Address(RVA = "0x1DEB470", Offset = "0x1DE9E70", VA = "0x181DEB470")]
internal DerUtcTime(byte[] bytes)
{
string text = Strings.FromAsciiByteArray(bytes);
this.time = text;
}
// Token: 0x0600A4DF RID: 42207 RVA: 0x00265744 File Offset: 0x00263944
[Token(Token = "0x600A4DF")]
[Address(RVA = "0x1DEB260", Offset = "0x1DE9C60", VA = "0x181DEB260")]
public DateTime ToDateTime()
{
string timeString = this.TimeString;
return this.ParseDateString(timeString, "yyMMddHHmmss'GMT'zzz");
}
// Token: 0x0600A4E0 RID: 42208 RVA: 0x00265764 File Offset: 0x00263964
[Token(Token = "0x600A4E0")]
[Address(RVA = "0x1DEB1B0", Offset = "0x1DE9BB0", VA = "0x181DEB1B0")]
public DateTime ToAdjustedDateTime()
{
string timeString = this.TimeString;
int num = 0;
char c = timeString[num];
string text = timeString + timeString;
return this.ParseDateString(text, "yyyyMMddHHmmss'GMT'zzz");
}
// Token: 0x0600A4E1 RID: 42209 RVA: 0x0026579C File Offset: 0x0026399C
[Token(Token = "0x600A4E1")]
[Address(RVA = "0x1DEB0F0", Offset = "0x1DE9AF0", VA = "0x181DEB0F0")]
private DateTime ParseDateString(string dateStr, string formatStr)
{
DateTimeFormatInfo invariantInfo = DateTimeFormatInfo.InvariantInfo;
return DateTime.ParseExact(dateStr, formatStr, invariantInfo);
}
// Token: 0x170019B4 RID: 6580
// (get) Token: 0x0600A4E2 RID: 42210 RVA: 0x002657BC File Offset: 0x002639BC
[Token(Token = "0x170019B4")]
public string TimeString
{
[Token(Token = "0x600A4E2")]
[Address(RVA = "0x1DEB510", Offset = "0x1DE9F10", VA = "0x181DEB510")]
get
{
uint num2;
int num = this.time.IndexOf((char)num2);
uint num4;
int num3 = this.time.IndexOf((char)num4);
string text = this.time;
if (text.m_stringLength != 11)
{
int num5 = 0;
return text.Substring(num5, 12) + "GMT+00:00";
}
int num6 = 0;
string text2 = text.Substring(num6, 10);
uint num8;
int num7 = this.time.IndexOf((char)num8);
uint num9;
num7 = this.time.IndexOf((char)num9);
string text3 = this.time;
int stringLength = text3.m_stringLength;
string text4;
if (num7 == stringLength)
{
text4 = text3 + "00";
}
string[] array = new string[5];
string text7;
if (num7 != 10)
{
int num10 = 0;
string text5 = text4.Substring(num10, 12);
if (text5 != 0)
{
}
array[0] = text5;
if ("GMT" != 0)
{
}
array[1] = "GMT";
string text6 = text4.Substring(12, 3);
if (text6 != 0)
{
}
array[2] = text6;
if (":" != 0)
{
}
array[3] = ":";
text7 = text4.Substring(15, 2);
if (text7 != 0)
{
}
}
int num11 = 0;
string text8 = text7.Substring(num11, 10);
if (text8 != 0)
{
}
array[0] = text8;
if ("00GMT" != 0)
{
}
array[1] = "00GMT";
string text9 = text7.Substring(10, 3);
if (text9 != 0)
{
}
array[2] = text9;
if (":" != 0)
{
}
array[3] = ":";
string text10 = text7.Substring(13, 2);
if (text10 != 0)
{
}
array[4] = text10;
return string.Concat(array);
}
}
// Token: 0x170019B5 RID: 6581
// (get) Token: 0x0600A4E3 RID: 42211 RVA: 0x00265974 File Offset: 0x00263B74
[Token(Token = "0x170019B5")]
[Obsolete]
public string AdjustedTime
{
[Token(Token = "0x600A4E3")]
[Address(RVA = "0x1DEB4A0", Offset = "0x1DE9EA0", VA = "0x181DEB4A0")]
get
{
string timeString = this.TimeString;
int num = 0;
char c = timeString[num];
return timeString + timeString;
}
}
// Token: 0x170019B6 RID: 6582
// (get) Token: 0x0600A4E4 RID: 42212 RVA: 0x002659A0 File Offset: 0x00263BA0
[Token(Token = "0x170019B6")]
public string AdjustedTimeString
{
[Token(Token = "0x600A4E4")]
[Address(RVA = "0x1DEB4A0", Offset = "0x1DE9EA0", VA = "0x181DEB4A0")]
get
{
string timeString = this.TimeString;
int num = 0;
char c = timeString[num];
return timeString + timeString;
}
}
// Token: 0x0600A4E5 RID: 42213 RVA: 0x002659CC File Offset: 0x00263BCC
[Token(Token = "0x600A4E5")]
[Address(RVA = "0x1DEB0E0", Offset = "0x1DE9AE0", VA = "0x181DEB0E0")]
private byte[] GetOctets()
{
return Strings.ToAsciiByteArray(this.time);
}
// Token: 0x0600A4E6 RID: 42214 RVA: 0x002659E4 File Offset: 0x00263BE4
[Token(Token = "0x600A4E6")]
[Address(RVA = "0x1DEADF0", Offset = "0x1DE97F0", VA = "0x181DEADF0", Slot = "6")]
internal override void Encode(DerOutputStream derOut)
{
byte[] array = Strings.ToAsciiByteArray(this.time);
derOut.WriteEncoded(23, array);
}
// Token: 0x0600A4E7 RID: 42215 RVA: 0x00265A0C File Offset: 0x00263C0C
[Token(Token = "0x600A4E7")]
[Address(RVA = "0x1DEAD50", Offset = "0x1DE9750", VA = "0x181DEAD50", Slot = "7")]
protected override bool Asn1Equals(Asn1Object asn1Object)
{
if (asn1Object != 0 && asn1Object != 0)
{
string text = this.time;
bool flag;
return flag;
}
throw new NullReferenceException();
}
// Token: 0x0600A4E8 RID: 42216 RVA: 0x00265A34 File Offset: 0x00263C34
[Token(Token = "0x600A4E8")]
[Address(RVA = "0x528AC0", Offset = "0x5274C0", VA = "0x180528AC0", Slot = "8")]
protected override int Asn1GetHashCode()
{
object obj = ((ICloneable)this.time).Clone();
throw new NullReferenceException();
}
// Token: 0x0600A4E9 RID: 42217 RVA: 0x00265A54 File Offset: 0x00263C54
[Token(Token = "0x600A4E9")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "3")]
public override string ToString()
{
return this.time;
}
// Token: 0x04006B86 RID: 27526
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006B86")]
private readonly string time;
}
}