193 lines
7.5 KiB
C#
193 lines
7.5 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
|
|
{
|
|
// Token: 0x0200200D RID: 8205
|
|
[Token(Token = "0x200200D")]
|
|
public class KekRecipientInfo : Asn1Encodable
|
|
{
|
|
// Token: 0x0600CD88 RID: 52616 RVA: 0x002EBCD0 File Offset: 0x002E9ED0
|
|
[Token(Token = "0x600CD88")]
|
|
[Address(RVA = "0x2FE5A60", Offset = "0x2FE4A60", VA = "0x182FE5A60")]
|
|
public KekRecipientInfo(KekIdentifier kekID, AlgorithmIdentifier keyEncryptionAlgorithm, Asn1OctetString encryptedKey)
|
|
{
|
|
DerInteger derInteger = new DerInteger(4);
|
|
this.version = derInteger;
|
|
this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
|
|
this.encryptedKey = encryptedKey;
|
|
this.kekID = kekID;
|
|
}
|
|
|
|
// Token: 0x0600CD89 RID: 52617 RVA: 0x002EBD08 File Offset: 0x002E9F08
|
|
[Token(Token = "0x600CD89")]
|
|
[Address(RVA = "0x2FE58E0", Offset = "0x2FE48E0", VA = "0x182FE58E0")]
|
|
public KekRecipientInfo(Asn1Sequence seq)
|
|
{
|
|
Asn1SequenceParser parser4;
|
|
for (;;)
|
|
{
|
|
base..ctor();
|
|
Asn1SequenceParser parser = seq.Parser;
|
|
if (parser == 0)
|
|
{
|
|
}
|
|
if (parser != 0)
|
|
{
|
|
this.version = parser;
|
|
Asn1SequenceParser parser2 = seq.Parser;
|
|
KekIdentifier kekIdentifier;
|
|
this.kekID = kekIdentifier;
|
|
Asn1SequenceParser parser3 = seq.Parser;
|
|
AlgorithmIdentifier algorithmIdentifier;
|
|
this.keyEncryptionAlgorithm = algorithmIdentifier;
|
|
parser4 = seq.Parser;
|
|
if (parser4 == 0 || parser4 != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
this.encryptedKey = parser4;
|
|
}
|
|
|
|
// Token: 0x0600CD8A RID: 52618 RVA: 0x002EBD74 File Offset: 0x002E9F74
|
|
[Token(Token = "0x600CD8A")]
|
|
[Address(RVA = "0x2FE5700", Offset = "0x2FE4700", VA = "0x182FE5700")]
|
|
public static KekRecipientInfo GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return KekRecipientInfo.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600CD8B RID: 52619 RVA: 0x002EBD90 File Offset: 0x002E9F90
|
|
[Token(Token = "0x600CD8B")]
|
|
[Address(RVA = "0x2FE5510", Offset = "0x2FE4510", VA = "0x182FE5510")]
|
|
public static KekRecipientInfo GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CD8B)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.KekRecipientInfo BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.KekRecipientInfo::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_26:
|
|
stloc:string(var_6_2C, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_7_3F, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid KekRecipientInfo: "), ldloc:string(var_6_2C))))
|
|
}
|
|
|
|
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: 0x17002066 RID: 8294
|
|
// (get) Token: 0x0600CD8C RID: 52620 RVA: 0x002EBDE0 File Offset: 0x002E9FE0
|
|
[Token(Token = "0x17002066")]
|
|
public DerInteger Version
|
|
{
|
|
[Token(Token = "0x600CD8C")]
|
|
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
|
get
|
|
{
|
|
return this.version;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17002067 RID: 8295
|
|
// (get) Token: 0x0600CD8D RID: 52621 RVA: 0x002EBDF4 File Offset: 0x002E9FF4
|
|
[Token(Token = "0x17002067")]
|
|
public KekIdentifier KekID
|
|
{
|
|
[Token(Token = "0x600CD8D")]
|
|
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
|
get
|
|
{
|
|
return this.kekID;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17002068 RID: 8296
|
|
// (get) Token: 0x0600CD8E RID: 52622 RVA: 0x002EBE08 File Offset: 0x002EA008
|
|
[Token(Token = "0x17002068")]
|
|
public AlgorithmIdentifier KeyEncryptionAlgorithm
|
|
{
|
|
[Token(Token = "0x600CD8E")]
|
|
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
|
|
get
|
|
{
|
|
return this.keyEncryptionAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17002069 RID: 8297
|
|
// (get) Token: 0x0600CD8F RID: 52623 RVA: 0x002EBE1C File Offset: 0x002EA01C
|
|
[Token(Token = "0x17002069")]
|
|
public Asn1OctetString EncryptedKey
|
|
{
|
|
[Token(Token = "0x600CD8F")]
|
|
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
|
get
|
|
{
|
|
return this.encryptedKey;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CD90 RID: 52624 RVA: 0x002EBE30 File Offset: 0x002EA030
|
|
[Token(Token = "0x600CD90")]
|
|
[Address(RVA = "0x2FE5720", Offset = "0x2FE4720", VA = "0x182FE5720", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[4];
|
|
DerInteger derInteger = this.version;
|
|
if (derInteger != 0)
|
|
{
|
|
}
|
|
array[0] = derInteger;
|
|
KekIdentifier kekIdentifier = this.kekID;
|
|
if (kekIdentifier != 0)
|
|
{
|
|
}
|
|
array[1] = kekIdentifier;
|
|
AlgorithmIdentifier algorithmIdentifier = this.keyEncryptionAlgorithm;
|
|
if (algorithmIdentifier != 0)
|
|
{
|
|
}
|
|
array[2] = algorithmIdentifier;
|
|
Asn1OctetString asn1OctetString = this.encryptedKey;
|
|
if (asn1OctetString != 0)
|
|
{
|
|
}
|
|
array[3] = asn1OctetString;
|
|
DerSequence derSequence = new DerSequence(array);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x04008257 RID: 33367
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4008257")]
|
|
private DerInteger version;
|
|
|
|
// Token: 0x04008258 RID: 33368
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4008258")]
|
|
private KekIdentifier kekID;
|
|
|
|
// Token: 0x04008259 RID: 33369
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4008259")]
|
|
private AlgorithmIdentifier keyEncryptionAlgorithm;
|
|
|
|
// Token: 0x0400825A RID: 33370
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400825A")]
|
|
private Asn1OctetString encryptedKey;
|
|
}
|
|
}
|