244 lines
9.3 KiB
C#
244 lines
9.3 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
|
|
{
|
|
// Token: 0x02002018 RID: 8216
|
|
[Token(Token = "0x2002018")]
|
|
public class PasswordRecipientInfo : Asn1Encodable
|
|
{
|
|
// Token: 0x0600CDE2 RID: 52706 RVA: 0x002ECF78 File Offset: 0x002EB178
|
|
[Token(Token = "0x600CDE2")]
|
|
[Address(RVA = "0x2FEB030", Offset = "0x2FEA030", VA = "0x182FEB030")]
|
|
public PasswordRecipientInfo(AlgorithmIdentifier keyEncryptionAlgorithm, Asn1OctetString encryptedKey)
|
|
{
|
|
int num;
|
|
DerInteger derInteger = new DerInteger(num);
|
|
num = 0;
|
|
this.version = derInteger;
|
|
this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
|
|
this.encryptedKey = encryptedKey;
|
|
}
|
|
|
|
// Token: 0x0600CDE3 RID: 52707 RVA: 0x002ECFAC File Offset: 0x002EB1AC
|
|
[Token(Token = "0x600CDE3")]
|
|
[Address(RVA = "0x2FEB0B0", Offset = "0x2FEA0B0", VA = "0x182FEB0B0")]
|
|
public PasswordRecipientInfo(AlgorithmIdentifier keyDerivationAlgorithm, AlgorithmIdentifier keyEncryptionAlgorithm, Asn1OctetString encryptedKey)
|
|
{
|
|
int num;
|
|
DerInteger derInteger = new DerInteger(num);
|
|
num = 0;
|
|
this.version = derInteger;
|
|
this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
|
|
this.encryptedKey = encryptedKey;
|
|
this.keyDerivationAlgorithm = keyDerivationAlgorithm;
|
|
}
|
|
|
|
// Token: 0x0600CDE4 RID: 52708 RVA: 0x002ECFE4 File Offset: 0x002EB1E4
|
|
[Token(Token = "0x600CDE4")]
|
|
[Address(RVA = "0x2FEAD50", Offset = "0x2FE9D50", VA = "0x182FEAD50")]
|
|
public PasswordRecipientInfo(Asn1Sequence seq)
|
|
{
|
|
Asn1SequenceParser parser7;
|
|
for (;;)
|
|
{
|
|
base..ctor();
|
|
Asn1SequenceParser parser = seq.Parser;
|
|
if (parser == 0)
|
|
{
|
|
}
|
|
if (parser != 0)
|
|
{
|
|
this.version = parser;
|
|
Asn1SequenceParser parser2 = seq.Parser;
|
|
if (parser2 != 0 && parser2 != 0)
|
|
{
|
|
Asn1SequenceParser parser3 = seq.Parser;
|
|
if (parser3 == 0)
|
|
{
|
|
}
|
|
if (parser3 == 0)
|
|
{
|
|
continue;
|
|
}
|
|
AlgorithmIdentifier algorithmIdentifier;
|
|
this.keyDerivationAlgorithm = algorithmIdentifier;
|
|
Asn1SequenceParser parser4 = seq.Parser;
|
|
AlgorithmIdentifier algorithmIdentifier2;
|
|
this.keyEncryptionAlgorithm = algorithmIdentifier2;
|
|
Asn1SequenceParser parser5 = seq.Parser;
|
|
if (parser5 == 0)
|
|
{
|
|
break;
|
|
}
|
|
if (parser5 == 0)
|
|
{
|
|
continue;
|
|
}
|
|
}
|
|
Asn1SequenceParser parser6 = seq.Parser;
|
|
AlgorithmIdentifier algorithmIdentifier3;
|
|
this.keyEncryptionAlgorithm = algorithmIdentifier3;
|
|
parser7 = seq.Parser;
|
|
if (parser7 == 0 || parser7 != 0)
|
|
{
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
this.encryptedKey = parser7;
|
|
}
|
|
|
|
// Token: 0x0600CDE5 RID: 52709 RVA: 0x002ED09C File Offset: 0x002EB29C
|
|
[Token(Token = "0x600CDE5")]
|
|
[Address(RVA = "0x2FEA8B0", Offset = "0x2FE98B0", VA = "0x182FEA8B0")]
|
|
public static PasswordRecipientInfo GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return PasswordRecipientInfo.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600CDE6 RID: 52710 RVA: 0x002ED0B8 File Offset: 0x002EB2B8
|
|
[Token(Token = "0x600CDE6")]
|
|
[Address(RVA = "0x2FEA8D0", Offset = "0x2FE98D0", VA = "0x182FEA8D0")]
|
|
public static PasswordRecipientInfo GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CDE6)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.PasswordRecipientInfo BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms.PasswordRecipientInfo::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 PasswordRecipientInfo: "), 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: 0x17002088 RID: 8328
|
|
// (get) Token: 0x0600CDE7 RID: 52711 RVA: 0x002ED108 File Offset: 0x002EB308
|
|
[Token(Token = "0x17002088")]
|
|
public DerInteger Version
|
|
{
|
|
[Token(Token = "0x600CDE7")]
|
|
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
|
|
get
|
|
{
|
|
return this.version;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17002089 RID: 8329
|
|
// (get) Token: 0x0600CDE8 RID: 52712 RVA: 0x002ED11C File Offset: 0x002EB31C
|
|
[Token(Token = "0x17002089")]
|
|
public AlgorithmIdentifier KeyDerivationAlgorithm
|
|
{
|
|
[Token(Token = "0x600CDE8")]
|
|
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
|
|
get
|
|
{
|
|
return this.keyDerivationAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700208A RID: 8330
|
|
// (get) Token: 0x0600CDE9 RID: 52713 RVA: 0x002ED130 File Offset: 0x002EB330
|
|
[Token(Token = "0x1700208A")]
|
|
public AlgorithmIdentifier KeyEncryptionAlgorithm
|
|
{
|
|
[Token(Token = "0x600CDE9")]
|
|
[Address(RVA = "0x4157C0", Offset = "0x4147C0", VA = "0x1804157C0")]
|
|
get
|
|
{
|
|
return this.keyEncryptionAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700208B RID: 8331
|
|
// (get) Token: 0x0600CDEA RID: 52714 RVA: 0x002ED144 File Offset: 0x002EB344
|
|
[Token(Token = "0x1700208B")]
|
|
public Asn1OctetString EncryptedKey
|
|
{
|
|
[Token(Token = "0x600CDEA")]
|
|
[Address(RVA = "0x4157D0", Offset = "0x4147D0", VA = "0x1804157D0")]
|
|
get
|
|
{
|
|
return this.encryptedKey;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CDEB RID: 52715 RVA: 0x002ED158 File Offset: 0x002EB358
|
|
[Token(Token = "0x600CDEB")]
|
|
[Address(RVA = "0x2FEAAC0", Offset = "0x2FE9AC0", VA = "0x182FEAAC0", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[1];
|
|
DerInteger derInteger = this.version;
|
|
if (derInteger != 0)
|
|
{
|
|
}
|
|
array[0] = derInteger;
|
|
Asn1EncodableVector asn1EncodableVector = new Asn1EncodableVector(array);
|
|
if (this.keyDerivationAlgorithm != (ulong)0L)
|
|
{
|
|
Asn1Encodable[] array2 = new Asn1Encodable[1];
|
|
AlgorithmIdentifier algorithmIdentifier = this.keyDerivationAlgorithm;
|
|
int num;
|
|
int num2;
|
|
DerTaggedObject derTaggedObject = new DerTaggedObject(num != 0, num2, algorithmIdentifier);
|
|
num2 = 0;
|
|
num = 0;
|
|
if (derTaggedObject != 0)
|
|
{
|
|
}
|
|
array2[0] = derTaggedObject;
|
|
asn1EncodableVector.Add(array2);
|
|
}
|
|
Asn1Encodable[] array3 = new Asn1Encodable[2];
|
|
AlgorithmIdentifier algorithmIdentifier2 = this.keyEncryptionAlgorithm;
|
|
if (algorithmIdentifier2 != 0)
|
|
{
|
|
}
|
|
array3[0] = algorithmIdentifier2;
|
|
Asn1OctetString asn1OctetString = this.encryptedKey;
|
|
if (asn1OctetString != 0)
|
|
{
|
|
}
|
|
array3[1] = asn1OctetString;
|
|
asn1EncodableVector.Add(array3);
|
|
DerSequence derSequence = new DerSequence(asn1EncodableVector);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x04008275 RID: 33397
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4008275")]
|
|
private readonly DerInteger version;
|
|
|
|
// Token: 0x04008276 RID: 33398
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4008276")]
|
|
private readonly AlgorithmIdentifier keyDerivationAlgorithm;
|
|
|
|
// Token: 0x04008277 RID: 33399
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4008277")]
|
|
private readonly AlgorithmIdentifier keyEncryptionAlgorithm;
|
|
|
|
// Token: 0x04008278 RID: 33400
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4008278")]
|
|
private readonly Asn1OctetString encryptedKey;
|
|
}
|
|
}
|