246 lines
9.4 KiB
C#
246 lines
9.4 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cms
|
|
{
|
|
// Token: 0x0200195B RID: 6491
|
|
[Token(Token = "0x200195B")]
|
|
[StructLayout(3)]
|
|
public class PasswordRecipientInfo : Asn1Encodable
|
|
{
|
|
// Token: 0x0600AE3A RID: 44602 RVA: 0x0028C2D8 File Offset: 0x0028A4D8
|
|
[Token(Token = "0x600AE3A")]
|
|
[Address(RVA = "0x28F6060", Offset = "0x28F4A60", VA = "0x1828F6060")]
|
|
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: 0x0600AE3B RID: 44603 RVA: 0x0028C30C File Offset: 0x0028A50C
|
|
[Token(Token = "0x600AE3B")]
|
|
[Address(RVA = "0x28F60E0", Offset = "0x28F4AE0", VA = "0x1828F60E0")]
|
|
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: 0x0600AE3C RID: 44604 RVA: 0x0028C344 File Offset: 0x0028A544
|
|
[Token(Token = "0x600AE3C")]
|
|
[Address(RVA = "0x28F5D80", Offset = "0x28F4780", VA = "0x1828F5D80")]
|
|
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: 0x0600AE3D RID: 44605 RVA: 0x0028C3FC File Offset: 0x0028A5FC
|
|
[Token(Token = "0x600AE3D")]
|
|
[Address(RVA = "0x28F58E0", Offset = "0x28F42E0", VA = "0x1828F58E0")]
|
|
public static PasswordRecipientInfo GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return PasswordRecipientInfo.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600AE3E RID: 44606 RVA: 0x0028C418 File Offset: 0x0028A618
|
|
[Token(Token = "0x600AE3E")]
|
|
[Address(RVA = "0x28F5900", Offset = "0x28F4300", VA = "0x1828F5900")]
|
|
public static PasswordRecipientInfo GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AE3E)
|
|
|
|
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: 0x17001BEA RID: 7146
|
|
// (get) Token: 0x0600AE3F RID: 44607 RVA: 0x0028C468 File Offset: 0x0028A668
|
|
[Token(Token = "0x17001BEA")]
|
|
public DerInteger Version
|
|
{
|
|
[Token(Token = "0x600AE3F")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
|
get
|
|
{
|
|
return this.version;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001BEB RID: 7147
|
|
// (get) Token: 0x0600AE40 RID: 44608 RVA: 0x0028C47C File Offset: 0x0028A67C
|
|
[Token(Token = "0x17001BEB")]
|
|
public AlgorithmIdentifier KeyDerivationAlgorithm
|
|
{
|
|
[Token(Token = "0x600AE40")]
|
|
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
|
get
|
|
{
|
|
return this.keyDerivationAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001BEC RID: 7148
|
|
// (get) Token: 0x0600AE41 RID: 44609 RVA: 0x0028C490 File Offset: 0x0028A690
|
|
[Token(Token = "0x17001BEC")]
|
|
public AlgorithmIdentifier KeyEncryptionAlgorithm
|
|
{
|
|
[Token(Token = "0x600AE41")]
|
|
[Address(RVA = "0x3C1220", Offset = "0x3BFC20", VA = "0x1803C1220")]
|
|
get
|
|
{
|
|
return this.keyEncryptionAlgorithm;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001BED RID: 7149
|
|
// (get) Token: 0x0600AE42 RID: 44610 RVA: 0x0028C4A4 File Offset: 0x0028A6A4
|
|
[Token(Token = "0x17001BED")]
|
|
public Asn1OctetString EncryptedKey
|
|
{
|
|
[Token(Token = "0x600AE42")]
|
|
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
|
|
get
|
|
{
|
|
return this.encryptedKey;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600AE43 RID: 44611 RVA: 0x0028C4B8 File Offset: 0x0028A6B8
|
|
[Token(Token = "0x600AE43")]
|
|
[Address(RVA = "0x28F5AF0", Offset = "0x28F44F0", VA = "0x1828F5AF0", 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: 0x04007279 RID: 29305
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007279")]
|
|
private readonly DerInteger version;
|
|
|
|
// Token: 0x0400727A RID: 29306
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400727A")]
|
|
private readonly AlgorithmIdentifier keyDerivationAlgorithm;
|
|
|
|
// Token: 0x0400727B RID: 29307
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400727B")]
|
|
private readonly AlgorithmIdentifier keyEncryptionAlgorithm;
|
|
|
|
// Token: 0x0400727C RID: 29308
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x400727C")]
|
|
private readonly Asn1OctetString encryptedKey;
|
|
}
|
|
}
|