using System; using System.IO; using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests; using Cpp2IlInjected; namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509 { // Token: 0x02001EF9 RID: 7929 [Token(Token = "0x2001EF9")] public class SubjectKeyIdentifier : Asn1Encodable { // Token: 0x0600C6DD RID: 50909 RVA: 0x002CF838 File Offset: 0x002CDA38 [Token(Token = "0x600C6DD")] [Address(RVA = "0x2E87970", Offset = "0x2E86970", VA = "0x182E87970")] public static SubjectKeyIdentifier GetInstance(Asn1TaggedObject obj, bool explicitly) { return SubjectKeyIdentifier.GetInstance(Asn1OctetString.GetInstance(obj, explicitly)); } // Token: 0x0600C6DE RID: 50910 RVA: 0x002CF854 File Offset: 0x002CDA54 [Token(Token = "0x600C6DE")] [Address(RVA = "0x2E87990", Offset = "0x2E86990", VA = "0x182E87990")] public static SubjectKeyIdentifier GetInstance(object obj) { /* An exception occurred when decompiling this method (0600C6DE) ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier::GetInstance(System.Object) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_42: stloc:string(var_10_48, call:string(Platform::GetTypeName, ldloc:object(obj))) stloc:ArgumentException(var_11_5B, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid SubjectKeyIdentifier: "), ldloc:string(var_10_48)))) } 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: 0x0600C6DF RID: 50911 RVA: 0x002CF8C0 File Offset: 0x002CDAC0 [Token(Token = "0x600C6DF")] [Address(RVA = "0x2E87CF0", Offset = "0x2E86CF0", VA = "0x182E87CF0")] public SubjectKeyIdentifier(byte[] keyID) { /* An exception occurred when decompiling this method (0600C6DF) ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier::.ctor(System.Byte[]) ---> System.Exception: Basic block has to end with unconditional control flow. { IL_12: stloc:ArgumentNullException(var_0_1C, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("keyID"))) } 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: 0x0600C6E0 RID: 50912 RVA: 0x002CF8EC File Offset: 0x002CDAEC [Token(Token = "0x600C6E0")] [Address(RVA = "0x2E87D70", Offset = "0x2E86D70", VA = "0x182E87D70")] public SubjectKeyIdentifier(Asn1OctetString keyID) { Stream octetStream = keyID.GetOctetStream(); this.keyIdentifier = octetStream; } // Token: 0x0600C6E1 RID: 50913 RVA: 0x002CF914 File Offset: 0x002CDB14 [Token(Token = "0x600C6E1")] [Address(RVA = "0x2E87DC0", Offset = "0x2E86DC0", VA = "0x182E87DC0")] public SubjectKeyIdentifier(SubjectPublicKeyInfo spki) { byte[] digest = SubjectKeyIdentifier.GetDigest(spki); this.keyIdentifier = digest; } // Token: 0x0600C6E2 RID: 50914 RVA: 0x002CF938 File Offset: 0x002CDB38 [Token(Token = "0x600C6E2")] [Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")] public byte[] GetKeyIdentifier() { return this.keyIdentifier; } // Token: 0x0600C6E3 RID: 50915 RVA: 0x002CF94C File Offset: 0x002CDB4C [Token(Token = "0x600C6E3")] [Address(RVA = "0x2E87C90", Offset = "0x2E86C90", VA = "0x182E87C90", Slot = "5")] public override Asn1Object ToAsn1Object() { /* An exception occurred when decompiling this method (0600C6E3) ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectKeyIdentifier::ToAsn1Object() ---> System.Exception: Basic block has to end with unconditional control flow. { Block_0: stloc:DerOctetString(var_0_0B, newobj:DerOctetString(DerOctetString::.ctor, ldfld:uint8[](SubjectKeyIdentifier::keyIdentifier, ldloc:SubjectKeyIdentifier(this)))) } 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: 0x0600C6E4 RID: 50916 RVA: 0x002CF964 File Offset: 0x002CDB64 [Token(Token = "0x600C6E4")] [Address(RVA = "0x2E87620", Offset = "0x2E86620", VA = "0x182E87620")] public static SubjectKeyIdentifier CreateSha1KeyIdentifier(SubjectPublicKeyInfo keyInfo) { byte[] digest = SubjectKeyIdentifier.GetDigest(keyInfo); SubjectKeyIdentifier subjectKeyIdentifier; subjectKeyIdentifier.keyIdentifier = digest; return subjectKeyIdentifier; } // Token: 0x0600C6E5 RID: 50917 RVA: 0x002CF980 File Offset: 0x002CDB80 [Token(Token = "0x600C6E5")] [Address(RVA = "0x2E87680", Offset = "0x2E86680", VA = "0x182E87680")] public static SubjectKeyIdentifier CreateTruncatedSha1KeyIdentifier(SubjectPublicKeyInfo keyInfo) { byte[] digest = SubjectKeyIdentifier.GetDigest(keyInfo); byte[] array = new byte[8]; int length = array.Length; int num = 0; int length2 = digest.Length; Array.Copy(digest, length2, array, num, length); byte b = array[0]; array[0] = b; array[0] = b; SubjectKeyIdentifier subjectKeyIdentifier; subjectKeyIdentifier.keyIdentifier = array; return subjectKeyIdentifier; } // Token: 0x0600C6E6 RID: 50918 RVA: 0x002CF9E4 File Offset: 0x002CDBE4 [Token(Token = "0x600C6E6")] [Address(RVA = "0x2E87790", Offset = "0x2E86790", VA = "0x182E87790")] private static byte[] GetDigest(SubjectPublicKeyInfo spki) { Sha1Digest sha1Digest = new Sha1Digest(); byte[] array = new byte[sha1Digest]; DerBitString keyData = spki.keyData; int num = 0; num += num; num++; int num2 = 0; if (num < num2) { num += num; num++; } return array; } // Token: 0x04007CAC RID: 31916 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007CAC")] private readonly byte[] keyIdentifier; } }