This commit is contained in:
niko
2026-04-10 22:50:51 +02:00
parent 6d1607d5a2
commit f18d448581
17033 changed files with 2863270 additions and 0 deletions
@@ -0,0 +1,242 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.EdEC;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019A0 RID: 6560
[Token(Token = "0x20019A0")]
public sealed class AgreementUtilities
{
// Token: 0x06009C9F RID: 40095 RVA: 0x0020AA20 File Offset: 0x00208C20
[Token(Token = "0x6009C9F")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private AgreementUtilities()
{
}
// Token: 0x06009CA0 RID: 40096 RVA: 0x0020AA34 File Offset: 0x00208C34
[Token(Token = "0x6009CA0")]
[Address(RVA = "0x19A5AE0", Offset = "0x19A48E0", VA = "0x1819A5AE0")]
static AgreementUtilities()
{
IDictionary dictionary = Platform.CreateHashtable();
DerObjectIdentifier dhsinglePassCofactorDHSha1KdfScheme = X9ObjectIdentifiers.DHSinglePassCofactorDHSha1KdfScheme;
DerObjectIdentifier dhsinglePassStdDHSha1KdfScheme = X9ObjectIdentifiers.DHSinglePassStdDHSha1KdfScheme;
DerObjectIdentifier mqvSinglePassSha1KdfScheme = X9ObjectIdentifiers.MqvSinglePassSha1KdfScheme;
DerObjectIdentifier id_X = EdECObjectIdentifiers.id_X25519;
DerObjectIdentifier id_X2 = EdECObjectIdentifiers.id_X448;
}
// Token: 0x06009CA1 RID: 40097 RVA: 0x0020AA74 File Offset: 0x00208C74
[Token(Token = "0x6009CA1")]
[Address(RVA = "0x19A5390", Offset = "0x19A4190", VA = "0x1819A5390")]
public static IBasicAgreement GetBasicAgreement(DerObjectIdentifier oid)
{
/*
An exception occurred when decompiling this method (06009CA1)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBasicAgreement BestHTTP.SecureProtocol.Org.BouncyCastle.Security.AgreementUtilities::GetBasicAgreement(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_7F:
stloc:SecurityUtilityException(var_6_86, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldloc:string(var_5)))
}
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.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.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.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: 0x06009CA2 RID: 40098 RVA: 0x0020AB08 File Offset: 0x00208D08
[Token(Token = "0x6009CA2")]
[Address(RVA = "0x19A55B0", Offset = "0x19A43B0", VA = "0x1819A55B0")]
public static IBasicAgreement GetBasicAgreement(string algorithm)
{
/*
An exception occurred when decompiling this method (06009CA2)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBasicAgreement BestHTTP.SecureProtocol.Org.BouncyCastle.Security.AgreementUtilities::GetBasicAgreement(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_74:
stloc:SecurityUtilityException(var_5_89, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("Basic Agreement "), ldloc:string(algorithm), ldstr:string(" not recognised."))))
}
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: 0x06009CA3 RID: 40099 RVA: 0x0020ABA0 File Offset: 0x00208DA0
[Token(Token = "0x6009CA3")]
[Address(RVA = "0x19A4FA0", Offset = "0x19A3DA0", VA = "0x1819A4FA0")]
public static IBasicAgreement GetBasicAgreementWithKdf(DerObjectIdentifier oid, string wrapAlgorithm)
{
/*
An exception occurred when decompiling this method (06009CA3)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBasicAgreement BestHTTP.SecureProtocol.Org.BouncyCastle.Security.AgreementUtilities::GetBasicAgreementWithKdf(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier,System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_63:
stloc:SecurityUtilityException(var_6_6A, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldloc:string(var_5)))
}
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.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: 0x06009CA4 RID: 40100 RVA: 0x0020AC18 File Offset: 0x00208E18
[Token(Token = "0x6009CA4")]
[Address(RVA = "0x19A51C0", Offset = "0x19A3FC0", VA = "0x1819A51C0")]
public static IBasicAgreement GetBasicAgreementWithKdf(string agreeAlgorithm, string wrapAlgorithm)
{
/*
An exception occurred when decompiling this method (06009CA4)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBasicAgreement BestHTTP.SecureProtocol.Org.BouncyCastle.Security.AgreementUtilities::GetBasicAgreementWithKdf(System.String,System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_58:
stloc:SecurityUtilityException(var_6_5F, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldloc:string(var_5)))
}
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: 0x06009CA5 RID: 40101 RVA: 0x0020AC88 File Offset: 0x00208E88
[Token(Token = "0x6009CA5")]
[Address(RVA = "0x19A5850", Offset = "0x19A4650", VA = "0x1819A5850")]
public static IRawAgreement GetRawAgreement(DerObjectIdentifier oid)
{
/*
An exception occurred when decompiling this method (06009CA5)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IRawAgreement BestHTTP.SecureProtocol.Org.BouncyCastle.Security.AgreementUtilities::GetRawAgreement(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_3A:
stloc:SecurityUtilityException(var_4_40, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldloc:string(var_3)))
}
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.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: 0x06009CA6 RID: 40102 RVA: 0x0020ACD8 File Offset: 0x00208ED8
[Token(Token = "0x6009CA6")]
[Address(RVA = "0x19A59C0", Offset = "0x19A47C0", VA = "0x1819A59C0")]
public static IRawAgreement GetRawAgreement(string algorithm)
{
/*
An exception occurred when decompiling this method (06009CA6)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IRawAgreement BestHTTP.SecureProtocol.Org.BouncyCastle.Security.AgreementUtilities::GetRawAgreement(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2F:
stloc:SecurityUtilityException(var_3_44, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("Raw Agreement "), ldloc:string(algorithm), ldstr:string(" not recognised."))))
}
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: 0x06009CA7 RID: 40103 RVA: 0x0020AD2C File Offset: 0x00208F2C
[Token(Token = "0x6009CA7")]
[Address(RVA = "0x19A4EF0", Offset = "0x19A3CF0", VA = "0x1819A4EF0")]
public static string GetAlgorithmName(DerObjectIdentifier oid)
{
throw new NullReferenceException();
}
// Token: 0x06009CA8 RID: 40104 RVA: 0x0020AD40 File Offset: 0x00208F40
[Token(Token = "0x6009CA8")]
[Address(RVA = "0x19A5780", Offset = "0x19A4580", VA = "0x1819A5780")]
private static string GetMechanism(string algorithm)
{
string text;
do
{
text = Platform.ToUpperInvariant(algorithm);
}
while (text != 0 && text == 0);
return text;
}
// Token: 0x04006957 RID: 26967
[Token(Token = "0x4006957")]
private static readonly IDictionary algorithms;
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates
{
// Token: 0x020019BA RID: 6586
[Token(Token = "0x20019BA")]
[Serializable]
public class CertificateEncodingException : CertificateException
{
// Token: 0x06009D67 RID: 40295 RVA: 0x00210350 File Offset: 0x0020E550
[Token(Token = "0x6009D67")]
[Address(RVA = "0x19A5D40", Offset = "0x19A4B40", VA = "0x1819A5D40")]
public CertificateEncodingException()
{
}
// Token: 0x06009D68 RID: 40296 RVA: 0x00210364 File Offset: 0x0020E564
[Token(Token = "0x6009D68")]
[Address(RVA = "0x19A5E20", Offset = "0x19A4C20", VA = "0x1819A5E20")]
public CertificateEncodingException(string msg)
: base(msg)
{
}
// Token: 0x06009D69 RID: 40297 RVA: 0x00210378 File Offset: 0x0020E578
[Token(Token = "0x6009D69")]
[Address(RVA = "0x19A5DA0", Offset = "0x19A4BA0", VA = "0x1819A5DA0")]
public CertificateEncodingException(string msg, Exception e)
: base(msg, e)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates
{
// Token: 0x020019BB RID: 6587
[Token(Token = "0x20019BB")]
[Serializable]
public class CertificateException : GeneralSecurityException
{
// Token: 0x06009D6A RID: 40298 RVA: 0x00210390 File Offset: 0x0020E590
[Token(Token = "0x6009D6A")]
[Address(RVA = "0x19A5D40", Offset = "0x19A4B40", VA = "0x1819A5D40")]
public CertificateException()
{
}
// Token: 0x06009D6B RID: 40299 RVA: 0x002103A4 File Offset: 0x0020E5A4
[Token(Token = "0x6009D6B")]
[Address(RVA = "0x19A5E20", Offset = "0x19A4C20", VA = "0x1819A5E20")]
public CertificateException(string message)
: base(message)
{
}
// Token: 0x06009D6C RID: 40300 RVA: 0x002103B8 File Offset: 0x0020E5B8
[Token(Token = "0x6009D6C")]
[Address(RVA = "0x19A5DA0", Offset = "0x19A4BA0", VA = "0x1819A5DA0")]
public CertificateException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates
{
// Token: 0x020019BC RID: 6588
[Token(Token = "0x20019BC")]
[Serializable]
public class CertificateExpiredException : CertificateException
{
// Token: 0x06009D6D RID: 40301 RVA: 0x002103D0 File Offset: 0x0020E5D0
[Token(Token = "0x6009D6D")]
[Address(RVA = "0x19A5D40", Offset = "0x19A4B40", VA = "0x1819A5D40")]
public CertificateExpiredException()
{
}
// Token: 0x06009D6E RID: 40302 RVA: 0x002103E4 File Offset: 0x0020E5E4
[Token(Token = "0x6009D6E")]
[Address(RVA = "0x19A5E20", Offset = "0x19A4C20", VA = "0x1819A5E20")]
public CertificateExpiredException(string message)
: base(message)
{
}
// Token: 0x06009D6F RID: 40303 RVA: 0x002103F8 File Offset: 0x0020E5F8
[Token(Token = "0x6009D6F")]
[Address(RVA = "0x19A5DA0", Offset = "0x19A4BA0", VA = "0x1819A5DA0")]
public CertificateExpiredException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates
{
// Token: 0x020019BD RID: 6589
[Token(Token = "0x20019BD")]
[Serializable]
public class CertificateNotYetValidException : CertificateException
{
// Token: 0x06009D70 RID: 40304 RVA: 0x00210410 File Offset: 0x0020E610
[Token(Token = "0x6009D70")]
[Address(RVA = "0x19A5D40", Offset = "0x19A4B40", VA = "0x1819A5D40")]
public CertificateNotYetValidException()
{
}
// Token: 0x06009D71 RID: 40305 RVA: 0x00210424 File Offset: 0x0020E624
[Token(Token = "0x6009D71")]
[Address(RVA = "0x19A5E20", Offset = "0x19A4C20", VA = "0x1819A5E20")]
public CertificateNotYetValidException(string message)
: base(message)
{
}
// Token: 0x06009D72 RID: 40306 RVA: 0x00210438 File Offset: 0x0020E638
[Token(Token = "0x6009D72")]
[Address(RVA = "0x19A5DA0", Offset = "0x19A4BA0", VA = "0x1819A5DA0")]
public CertificateNotYetValidException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates
{
// Token: 0x020019BE RID: 6590
[Token(Token = "0x20019BE")]
[Serializable]
public class CertificateParsingException : CertificateException
{
// Token: 0x06009D73 RID: 40307 RVA: 0x00210450 File Offset: 0x0020E650
[Token(Token = "0x6009D73")]
[Address(RVA = "0x19A5D40", Offset = "0x19A4B40", VA = "0x1819A5D40")]
public CertificateParsingException()
{
}
// Token: 0x06009D74 RID: 40308 RVA: 0x00210464 File Offset: 0x0020E664
[Token(Token = "0x6009D74")]
[Address(RVA = "0x19A5E20", Offset = "0x19A4C20", VA = "0x1819A5E20")]
public CertificateParsingException(string message)
: base(message)
{
}
// Token: 0x06009D75 RID: 40309 RVA: 0x00210478 File Offset: 0x0020E678
[Token(Token = "0x6009D75")]
[Address(RVA = "0x19A5DA0", Offset = "0x19A4BA0", VA = "0x1819A5DA0")]
public CertificateParsingException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security.Certificates
{
// Token: 0x020019BF RID: 6591
[Token(Token = "0x20019BF")]
[Serializable]
public class CrlException : GeneralSecurityException
{
// Token: 0x06009D76 RID: 40310 RVA: 0x00210490 File Offset: 0x0020E690
[Token(Token = "0x6009D76")]
[Address(RVA = "0x19A5D40", Offset = "0x19A4B40", VA = "0x1819A5D40")]
public CrlException()
{
}
// Token: 0x06009D77 RID: 40311 RVA: 0x002104A4 File Offset: 0x0020E6A4
[Token(Token = "0x6009D77")]
[Address(RVA = "0x19A5E20", Offset = "0x19A4C20", VA = "0x1819A5E20")]
public CrlException(string msg)
: base(msg)
{
}
// Token: 0x06009D78 RID: 40312 RVA: 0x002104B8 File Offset: 0x0020E6B8
[Token(Token = "0x6009D78")]
[Address(RVA = "0x19A5DA0", Offset = "0x19A4BA0", VA = "0x1819A5DA0")]
public CrlException(string msg, Exception e)
: base(msg, e)
{
}
}
}
@@ -0,0 +1,536 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019A1 RID: 6561
[Token(Token = "0x20019A1")]
public sealed class CipherUtilities
{
// Token: 0x06009CA9 RID: 40105 RVA: 0x0020AD64 File Offset: 0x00208F64
[Token(Token = "0x6009CA9")]
[Address(RVA = "0x19A80B0", Offset = "0x19A6EB0", VA = "0x1819A80B0")]
static CipherUtilities()
{
/*
An exception occurred when decompiling this method (06009CA9)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities::.cctor()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:IDictionary(var_2_09, call:IDictionary(Platform::CreateHashtable))
stsfld:IDictionary(CipherUtilities::algorithms, ldloc:IDictionary(var_2_09))
stsfld:IDictionary(CipherUtilities::oids, call:IDictionary(Platform::CreateHashtable))
stloc:Enum(var_4_2B, call:Enum(Enums::GetArbitraryValue, call:Type(Type::GetTypeFromHandle, ldtoken:RuntimeTypeHandle(BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities/CipherAlgorithm))))
stloc:Enum(var_8_48, call:Enum(Enums::GetArbitraryValue, call:Type(Type::GetTypeFromHandle, ldtoken:RuntimeTypeHandle(BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities/CipherMode))))
stloc:Enum(var_12_65, call:Enum(Enums::GetArbitraryValue, call:Type(Type::GetTypeFromHandle, ldtoken:RuntimeTypeHandle(BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities/CipherPadding))))
stloc:IDictionary(var_16_78, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_17_7F, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes128Ecb))
stloc:IDictionary(var_19_86, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_20_8D, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes192Ecb))
stloc:IDictionary(var_22_94, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_23_9B, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes256Ecb))
stloc:IDictionary(var_25_A2, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_27_A9, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_29_B0, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_31_B7, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_33_BE, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_34_C5, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes128Cbc))
stloc:IDictionary(var_36_CC, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_37_D3, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes192Cbc))
stloc:IDictionary(var_39_DA, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_40_E1, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes256Cbc))
stloc:IDictionary(var_42_E8, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_43_EF, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes128Ofb))
stloc:IDictionary(var_45_F6, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_46_FD, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes192Ofb))
stloc:IDictionary(var_48_104, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_49_10B, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes256Ofb))
stloc:IDictionary(var_51_112, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_52_119, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes128Cfb))
stloc:IDictionary(var_54_120, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_55_127, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes192Cfb))
stloc:IDictionary(var_57_12E, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_58_135, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdAes256Cfb))
stloc:IDictionary(var_60_13C, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_62_143, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_64_14A, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_65_151, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::RsaEncryption))
stloc:IDictionary(var_67_158, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_68_15F, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::IdRsaesOaep))
stloc:IDictionary(var_70_166, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_71_16D, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::DesCbc))
stloc:IDictionary(var_73_174, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_74_17B, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::DesCfb))
stloc:IDictionary(var_76_182, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_77_189, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::DesEcb))
stloc:IDictionary(var_79_190, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_80_197, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::DesOfb))
stloc:IDictionary(var_82_19E, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_83_1A5, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::DesEde))
stloc:IDictionary(var_85_1AC, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_87_1B3, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_88_1BA, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::DesEde3Cbc))
stloc:IDictionary(var_90_1C1, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_91_1C8, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::RC2Cbc))
stloc:IDictionary(var_93_1CF, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_95_1D6, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_97_1DD, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_99_1E4, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_101_1EB, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_103_1F2, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_105_1F9, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_106_200, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd128BitRC4))
stloc:IDictionary(var_108_207, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_110_20E, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_111_215, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd40BitRC4))
stloc:IDictionary(var_113_21C, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_115_223, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_116_22A, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithSha1AndDesCbc))
stloc:IDictionary(var_118_231, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_120_238, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_121_23F, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithSha1AndRC2Cbc))
stloc:IDictionary(var_123_246, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_125_24D, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_127_254, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_128_25B, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd3KeyTripleDesCbc))
stloc:IDictionary(var_130_262, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_132_269, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_134_270, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_135_277, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd2KeyTripleDesCbc))
stloc:IDictionary(var_137_27E, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_139_285, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_140_28C, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd128BitRC2Cbc))
stloc:IDictionary(var_142_293, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_144_29A, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:DerObjectIdentifier(var_145_2A1, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbewithShaAnd40BitRC2Cbc))
stloc:IDictionary(var_147_2A8, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_149_2AF, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_151_2B6, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_153_2BD, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_155_2C4, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_157_2CB, ldsfld:IDictionary(CipherUtilities::algorithms))
stloc:IDictionary(var_159_2D2, ldsfld:IDictionary(CipherUtilities::algorithms))
}
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: 0x06009CAA RID: 40106 RVA: 0x0020B044 File Offset: 0x00209244
[Token(Token = "0x6009CAA")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private CipherUtilities()
{
}
// Token: 0x06009CAB RID: 40107 RVA: 0x0020B058 File Offset: 0x00209258
[Token(Token = "0x6009CAB")]
[Address(RVA = "0x19A7F00", Offset = "0x19A6D00", VA = "0x1819A7F00")]
public static DerObjectIdentifier GetObjectIdentifier(string mechanism)
{
/*
An exception occurred when decompiling this method (06009CAB)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities::GetObjectIdentifier(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2E:
stloc:ArgumentNullException(var_7_38, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("mechanism")))
}
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: 0x17001904 RID: 6404
// (get) Token: 0x06009CAC RID: 40108 RVA: 0x0020B0A0 File Offset: 0x002092A0
[Token(Token = "0x17001904")]
public static ICollection Algorithms
{
[Token(Token = "0x6009CAC")]
[Address(RVA = "0x19A9800", Offset = "0x19A8600", VA = "0x1819A9800")]
get
{
IDictionary dictionary = CipherUtilities.oids;
throw new NullReferenceException();
}
}
// Token: 0x06009CAD RID: 40109 RVA: 0x0020B0B8 File Offset: 0x002092B8
[Token(Token = "0x6009CAD")]
[Address(RVA = "0x19A6400", Offset = "0x19A5200", VA = "0x1819A6400")]
public static IBufferedCipher GetCipher(DerObjectIdentifier oid)
{
return CipherUtilities.GetCipher(oid.identifier);
}
// Token: 0x06009CAE RID: 40110 RVA: 0x0020B0D8 File Offset: 0x002092D8
[Token(Token = "0x6009CAE")]
[Address(RVA = "0x19A6460", Offset = "0x19A5260", VA = "0x1819A6460")]
public static IBufferedCipher GetCipher(string algorithm)
{
/*
An exception occurred when decompiling this method (06009CAE)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBufferedCipher BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities::GetCipher(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_535:
stloc:Kdf2BytesGenerator(var_102_53F, newobj:Kdf2BytesGenerator(Kdf2BytesGenerator::.ctor, newobj:Sha1Digest[exp:IDigest](Sha1Digest::.ctor)))
}
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: 0x06009CAF RID: 40111 RVA: 0x0020B628 File Offset: 0x00209828
[Token(Token = "0x6009CAF")]
[Address(RVA = "0x19A6350", Offset = "0x19A5150", VA = "0x1819A6350")]
public static string GetAlgorithmName(DerObjectIdentifier oid)
{
IDictionary dictionary = CipherUtilities.algorithms;
throw new NullReferenceException();
}
// Token: 0x06009CB0 RID: 40112 RVA: 0x0020B640 File Offset: 0x00209840
[Token(Token = "0x6009CB0")]
[Address(RVA = "0x19A7E50", Offset = "0x19A6C50", VA = "0x1819A7E50")]
private static int GetDigitIndex(string s)
{
int num = 0;
if (num < s.m_stringLength)
{
if (!char.IsDigit(s[num]))
{
num++;
}
return num;
}
return -1;
}
// Token: 0x06009CB1 RID: 40113 RVA: 0x0020B674 File Offset: 0x00209874
[Token(Token = "0x6009CB1")]
[Address(RVA = "0x19A5E90", Offset = "0x19A4C90", VA = "0x1819A5E90")]
private static IBlockCipher CreateBlockCipher(CipherUtilities.CipherAlgorithm cipherAlgorithm)
{
/*
An exception occurred when decompiling this method (06009CB1)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities::CreateBlockCipher(BestHTTP.SecureProtocol.Org.BouncyCastle.Security.CipherUtilities/CipherAlgorithm)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_C3:
stloc:SecurityUtilityException(var_30_D8, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("Cipher "), ldloc:CipherAlgorithm[exp:object](cipherAlgorithm), ldstr:string[exp:object](" not recognised or not a block cipher"))))
}
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: 0x04006958 RID: 26968
[Token(Token = "0x4006958")]
private static readonly IDictionary algorithms;
// Token: 0x04006959 RID: 26969
[Token(Token = "0x4006959")]
private static readonly IDictionary oids;
// Token: 0x020019A2 RID: 6562
[Token(Token = "0x20019A2")]
private enum CipherAlgorithm
{
// Token: 0x0400695B RID: 26971
[Token(Token = "0x400695B")]
AES,
// Token: 0x0400695C RID: 26972
[Token(Token = "0x400695C")]
ARC4,
// Token: 0x0400695D RID: 26973
[Token(Token = "0x400695D")]
BLOWFISH,
// Token: 0x0400695E RID: 26974
[Token(Token = "0x400695E")]
CAMELLIA,
// Token: 0x0400695F RID: 26975
[Token(Token = "0x400695F")]
CAST5,
// Token: 0x04006960 RID: 26976
[Token(Token = "0x4006960")]
CAST6,
// Token: 0x04006961 RID: 26977
[Token(Token = "0x4006961")]
DES,
// Token: 0x04006962 RID: 26978
[Token(Token = "0x4006962")]
DESEDE,
// Token: 0x04006963 RID: 26979
[Token(Token = "0x4006963")]
ELGAMAL,
// Token: 0x04006964 RID: 26980
[Token(Token = "0x4006964")]
GOST28147,
// Token: 0x04006965 RID: 26981
[Token(Token = "0x4006965")]
HC128,
// Token: 0x04006966 RID: 26982
[Token(Token = "0x4006966")]
HC256,
// Token: 0x04006967 RID: 26983
[Token(Token = "0x4006967")]
IDEA,
// Token: 0x04006968 RID: 26984
[Token(Token = "0x4006968")]
NOEKEON,
// Token: 0x04006969 RID: 26985
[Token(Token = "0x4006969")]
PBEWITHSHAAND128BITRC4,
// Token: 0x0400696A RID: 26986
[Token(Token = "0x400696A")]
PBEWITHSHAAND40BITRC4,
// Token: 0x0400696B RID: 26987
[Token(Token = "0x400696B")]
RC2,
// Token: 0x0400696C RID: 26988
[Token(Token = "0x400696C")]
RC5,
// Token: 0x0400696D RID: 26989
[Token(Token = "0x400696D")]
RC5_64,
// Token: 0x0400696E RID: 26990
[Token(Token = "0x400696E")]
RC6,
// Token: 0x0400696F RID: 26991
[Token(Token = "0x400696F")]
RIJNDAEL,
// Token: 0x04006970 RID: 26992
[Token(Token = "0x4006970")]
RSA,
// Token: 0x04006971 RID: 26993
[Token(Token = "0x4006971")]
SALSA20,
// Token: 0x04006972 RID: 26994
[Token(Token = "0x4006972")]
SEED,
// Token: 0x04006973 RID: 26995
[Token(Token = "0x4006973")]
SERPENT,
// Token: 0x04006974 RID: 26996
[Token(Token = "0x4006974")]
SKIPJACK,
// Token: 0x04006975 RID: 26997
[Token(Token = "0x4006975")]
SM4,
// Token: 0x04006976 RID: 26998
[Token(Token = "0x4006976")]
TEA,
// Token: 0x04006977 RID: 26999
[Token(Token = "0x4006977")]
THREEFISH_256,
// Token: 0x04006978 RID: 27000
[Token(Token = "0x4006978")]
THREEFISH_512,
// Token: 0x04006979 RID: 27001
[Token(Token = "0x4006979")]
THREEFISH_1024,
// Token: 0x0400697A RID: 27002
[Token(Token = "0x400697A")]
TNEPRES,
// Token: 0x0400697B RID: 27003
[Token(Token = "0x400697B")]
TWOFISH,
// Token: 0x0400697C RID: 27004
[Token(Token = "0x400697C")]
VMPC,
// Token: 0x0400697D RID: 27005
[Token(Token = "0x400697D")]
VMPC_KSA3,
// Token: 0x0400697E RID: 27006
[Token(Token = "0x400697E")]
XTEA
}
// Token: 0x020019A3 RID: 6563
[Token(Token = "0x20019A3")]
private enum CipherMode
{
// Token: 0x04006980 RID: 27008
[Token(Token = "0x4006980")]
ECB,
// Token: 0x04006981 RID: 27009
[Token(Token = "0x4006981")]
NONE,
// Token: 0x04006982 RID: 27010
[Token(Token = "0x4006982")]
CBC,
// Token: 0x04006983 RID: 27011
[Token(Token = "0x4006983")]
CCM,
// Token: 0x04006984 RID: 27012
[Token(Token = "0x4006984")]
CFB,
// Token: 0x04006985 RID: 27013
[Token(Token = "0x4006985")]
CTR,
// Token: 0x04006986 RID: 27014
[Token(Token = "0x4006986")]
CTS,
// Token: 0x04006987 RID: 27015
[Token(Token = "0x4006987")]
EAX,
// Token: 0x04006988 RID: 27016
[Token(Token = "0x4006988")]
GCM,
// Token: 0x04006989 RID: 27017
[Token(Token = "0x4006989")]
GOFB,
// Token: 0x0400698A RID: 27018
[Token(Token = "0x400698A")]
OCB,
// Token: 0x0400698B RID: 27019
[Token(Token = "0x400698B")]
OFB,
// Token: 0x0400698C RID: 27020
[Token(Token = "0x400698C")]
OPENPGPCFB,
// Token: 0x0400698D RID: 27021
[Token(Token = "0x400698D")]
SIC
}
// Token: 0x020019A4 RID: 6564
[Token(Token = "0x20019A4")]
private enum CipherPadding
{
// Token: 0x0400698F RID: 27023
[Token(Token = "0x400698F")]
NOPADDING,
// Token: 0x04006990 RID: 27024
[Token(Token = "0x4006990")]
RAW,
// Token: 0x04006991 RID: 27025
[Token(Token = "0x4006991")]
ISO10126PADDING,
// Token: 0x04006992 RID: 27026
[Token(Token = "0x4006992")]
ISO10126D2PADDING,
// Token: 0x04006993 RID: 27027
[Token(Token = "0x4006993")]
ISO10126_2PADDING,
// Token: 0x04006994 RID: 27028
[Token(Token = "0x4006994")]
ISO7816_4PADDING,
// Token: 0x04006995 RID: 27029
[Token(Token = "0x4006995")]
ISO9797_1PADDING,
// Token: 0x04006996 RID: 27030
[Token(Token = "0x4006996")]
ISO9796_1,
// Token: 0x04006997 RID: 27031
[Token(Token = "0x4006997")]
ISO9796_1PADDING,
// Token: 0x04006998 RID: 27032
[Token(Token = "0x4006998")]
OAEP,
// Token: 0x04006999 RID: 27033
[Token(Token = "0x4006999")]
OAEPPADDING,
// Token: 0x0400699A RID: 27034
[Token(Token = "0x400699A")]
OAEPWITHMD5ANDMGF1PADDING,
// Token: 0x0400699B RID: 27035
[Token(Token = "0x400699B")]
OAEPWITHSHA1ANDMGF1PADDING,
// Token: 0x0400699C RID: 27036
[Token(Token = "0x400699C")]
OAEPWITHSHA_1ANDMGF1PADDING,
// Token: 0x0400699D RID: 27037
[Token(Token = "0x400699D")]
OAEPWITHSHA224ANDMGF1PADDING,
// Token: 0x0400699E RID: 27038
[Token(Token = "0x400699E")]
OAEPWITHSHA_224ANDMGF1PADDING,
// Token: 0x0400699F RID: 27039
[Token(Token = "0x400699F")]
OAEPWITHSHA256ANDMGF1PADDING,
// Token: 0x040069A0 RID: 27040
[Token(Token = "0x40069A0")]
OAEPWITHSHA_256ANDMGF1PADDING,
// Token: 0x040069A1 RID: 27041
[Token(Token = "0x40069A1")]
OAEPWITHSHA384ANDMGF1PADDING,
// Token: 0x040069A2 RID: 27042
[Token(Token = "0x40069A2")]
OAEPWITHSHA_384ANDMGF1PADDING,
// Token: 0x040069A3 RID: 27043
[Token(Token = "0x40069A3")]
OAEPWITHSHA512ANDMGF1PADDING,
// Token: 0x040069A4 RID: 27044
[Token(Token = "0x40069A4")]
OAEPWITHSHA_512ANDMGF1PADDING,
// Token: 0x040069A5 RID: 27045
[Token(Token = "0x40069A5")]
PKCS1,
// Token: 0x040069A6 RID: 27046
[Token(Token = "0x40069A6")]
PKCS1PADDING,
// Token: 0x040069A7 RID: 27047
[Token(Token = "0x40069A7")]
PKCS5,
// Token: 0x040069A8 RID: 27048
[Token(Token = "0x40069A8")]
PKCS5PADDING,
// Token: 0x040069A9 RID: 27049
[Token(Token = "0x40069A9")]
PKCS7,
// Token: 0x040069AA RID: 27050
[Token(Token = "0x40069AA")]
PKCS7PADDING,
// Token: 0x040069AB RID: 27051
[Token(Token = "0x40069AB")]
TBCPADDING,
// Token: 0x040069AC RID: 27052
[Token(Token = "0x40069AC")]
WITHCTS,
// Token: 0x040069AD RID: 27053
[Token(Token = "0x40069AD")]
X923PADDING,
// Token: 0x040069AE RID: 27054
[Token(Token = "0x40069AE")]
ZEROBYTEPADDING
}
}
}
@@ -0,0 +1,404 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019A5 RID: 6565
[Token(Token = "0x20019A5")]
public sealed class DigestUtilities
{
// Token: 0x06009CB2 RID: 40114 RVA: 0x0020B75C File Offset: 0x0020995C
[Token(Token = "0x6009CB2")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private DigestUtilities()
{
}
// Token: 0x06009CB3 RID: 40115 RVA: 0x0020B770 File Offset: 0x00209970
[Token(Token = "0x6009CB3")]
[Address(RVA = "0x19AA5C0", Offset = "0x19A93C0", VA = "0x1819AA5C0")]
static DigestUtilities()
{
/*
An exception occurred when decompiling this method (06009CB3)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Security.DigestUtilities::.cctor()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:IDictionary(var_2_07, call:IDictionary(Platform::CreateHashtable))
stsfld:IDictionary(DigestUtilities::algorithms, ldloc:IDictionary(var_2_07))
stsfld:IDictionary(DigestUtilities::oids, call:IDictionary(Platform::CreateHashtable))
stloc:Enum(var_4_29, call:Enum(Enums::GetArbitraryValue, call:Type(Type::GetTypeFromHandle, ldtoken:RuntimeTypeHandle(BestHTTP.SecureProtocol.Org.BouncyCastle.Security.DigestUtilities/DigestAlgorithm))))
stloc:IDictionary(var_8_3C, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_9_43, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD2))
stloc:IDictionary(var_11_4A, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_12_51, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD4))
stloc:IDictionary(var_14_58, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_15_5F, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD5))
stloc:IDictionary(var_17_66, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_19_6D, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_20_74, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::IdSha1))
stloc:IDictionary(var_22_7B, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_24_82, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_25_89, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha224))
stloc:IDictionary(var_27_90, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_29_97, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_30_9E, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha256))
stloc:IDictionary(var_32_A5, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_34_AC, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_35_B3, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha384))
stloc:IDictionary(var_37_BA, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_39_C1, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_40_C8, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha512))
stloc:IDictionary(var_42_CF, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_44_D6, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_45_DD, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha512_224))
stloc:IDictionary(var_47_E4, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_49_EB, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_50_F2, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha512_256))
stloc:IDictionary(var_52_F9, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_54_100, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_55_107, ldsfld:DerObjectIdentifier(TeleTrusTObjectIdentifiers::RipeMD128))
stloc:IDictionary(var_57_10E, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_59_115, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_60_11C, ldsfld:DerObjectIdentifier(TeleTrusTObjectIdentifiers::RipeMD160))
stloc:IDictionary(var_62_123, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_64_12A, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_65_131, ldsfld:DerObjectIdentifier(TeleTrusTObjectIdentifiers::RipeMD256))
stloc:IDictionary(var_67_138, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_69_13F, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_70_146, ldsfld:DerObjectIdentifier(CryptoProObjectIdentifiers::GostR3411))
stloc:IDictionary(var_72_14D, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_74_154, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_76_15B, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_78_162, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_80_169, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:IDictionary(var_82_170, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_83_177, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha3_224))
stloc:IDictionary(var_85_17E, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_86_185, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha3_256))
stloc:IDictionary(var_88_18C, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_89_193, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha3_384))
stloc:IDictionary(var_91_19A, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_92_1A1, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha3_512))
stloc:IDictionary(var_94_1A8, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_95_1AF, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdShake128))
stloc:IDictionary(var_97_1B6, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_98_1BD, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdShake256))
stloc:IDictionary(var_100_1C4, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_101_1CB, ldsfld:DerObjectIdentifier(GMObjectIdentifiers::sm3))
stloc:IDictionary(var_103_1D2, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_104_1D9, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2b160))
stloc:IDictionary(var_106_1E0, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_107_1E7, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2b256))
stloc:IDictionary(var_109_1EE, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_110_1F5, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2b384))
stloc:IDictionary(var_112_1FC, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_113_203, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2b512))
stloc:IDictionary(var_115_20A, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_116_211, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2s128))
stloc:IDictionary(var_118_218, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_119_21F, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2s160))
stloc:IDictionary(var_121_226, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_122_22D, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2s224))
stloc:IDictionary(var_124_234, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_125_23B, ldsfld:DerObjectIdentifier(MiscObjectIdentifiers::id_blake2s256))
stloc:IDictionary(var_127_242, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_128_249, ldsfld:DerObjectIdentifier(RosstandartObjectIdentifiers::id_tc26_gost_3411_12_256))
stloc:IDictionary(var_130_250, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_131_257, ldsfld:DerObjectIdentifier(RosstandartObjectIdentifiers::id_tc26_gost_3411_12_512))
stloc:IDictionary(var_133_25E, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_134_265, ldsfld:DerObjectIdentifier(UAObjectIdentifiers::dstu7564digest_256))
stloc:IDictionary(var_136_26C, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_137_273, ldsfld:DerObjectIdentifier(UAObjectIdentifiers::dstu7564digest_384))
stloc:IDictionary(var_139_27A, ldsfld:IDictionary(DigestUtilities::algorithms))
stloc:DerObjectIdentifier(var_140_281, ldsfld:DerObjectIdentifier(UAObjectIdentifiers::dstu7564digest_512))
stloc:IDictionary(var_142_288, ldsfld:IDictionary(DigestUtilities::oids))
stloc:DerObjectIdentifier(var_143_28F, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD2))
stloc:IDictionary(var_144_296, ldsfld:IDictionary(DigestUtilities::oids))
stloc:DerObjectIdentifier(var_145_29D, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD4))
stloc:IDictionary(var_146_2A4, ldsfld:IDictionary(DigestUtilities::oids))
stloc:DerObjectIdentifier(var_147_2AB, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD5))
stloc:IDictionary(var_148_2B2, ldsfld:IDictionary(DigestUtilities::oids))
stloc:DerObjectIdentifier(var_149_2B9, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::IdSha1))
stloc:IDictionary(var_150_2C0, ldsfld:IDictionary(DigestUtilities::oids))
stloc:DerObjectIdentifier(var_151_2C7, ldsfld:DerObjectIdentifier(NistObjectIdentifiers::IdSha224))
stloc:IDictionary(var_152_2CE, ldsfld:IDictionary(DigestUtilities::oids))
}
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: 0x06009CB4 RID: 40116 RVA: 0x0020BA4C File Offset: 0x00209C4C
[Token(Token = "0x6009CB4")]
[Address(RVA = "0x19AA410", Offset = "0x19A9210", VA = "0x1819AA410")]
public static DerObjectIdentifier GetObjectIdentifier(string mechanism)
{
/*
An exception occurred when decompiling this method (06009CB4)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier BestHTTP.SecureProtocol.Org.BouncyCastle.Security.DigestUtilities::GetObjectIdentifier(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2E:
stloc:ArgumentNullException(var_7_38, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("mechanism")))
}
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: 0x17001905 RID: 6405
// (get) Token: 0x06009CB5 RID: 40117 RVA: 0x0020BA94 File Offset: 0x00209C94
[Token(Token = "0x17001905")]
public static ICollection Algorithms
{
[Token(Token = "0x6009CB5")]
[Address(RVA = "0x19AC1A0", Offset = "0x19AAFA0", VA = "0x1819AC1A0")]
get
{
IDictionary dictionary = DigestUtilities.oids;
throw new NullReferenceException();
}
}
// Token: 0x06009CB6 RID: 40118 RVA: 0x0020BAAC File Offset: 0x00209CAC
[Token(Token = "0x6009CB6")]
[Address(RVA = "0x19A9B60", Offset = "0x19A8960", VA = "0x1819A9B60")]
public static IDigest GetDigest(DerObjectIdentifier id)
{
return DigestUtilities.GetDigest(id.identifier);
}
// Token: 0x06009CB7 RID: 40119 RVA: 0x0020BACC File Offset: 0x00209CCC
[Token(Token = "0x6009CB7")]
[Address(RVA = "0x19A9BC0", Offset = "0x19A89C0", VA = "0x1819A9BC0")]
public static IDigest GetDigest(string algorithm)
{
/*
An exception occurred when decompiling this method (06009CB7)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IDigest BestHTTP.SecureProtocol.Org.BouncyCastle.Security.DigestUtilities::GetDigest(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_18D:
stloc:SecurityUtilityException(var_69_1A2, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("Digest "), ldloc:string(var_0_06), ldstr:string(" not recognised."))))
}
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: 0x06009CB8 RID: 40120 RVA: 0x0020BC7C File Offset: 0x00209E7C
[Token(Token = "0x6009CB8")]
[Address(RVA = "0x19A9AB0", Offset = "0x19A88B0", VA = "0x1819A9AB0")]
public static string GetAlgorithmName(DerObjectIdentifier oid)
{
IDictionary dictionary = DigestUtilities.algorithms;
throw new NullReferenceException();
}
// Token: 0x06009CB9 RID: 40121 RVA: 0x0020BC94 File Offset: 0x00209E94
[Token(Token = "0x6009CB9")]
[Address(RVA = "0x19A9880", Offset = "0x19A8680", VA = "0x1819A9880")]
public static byte[] CalculateDigest(string algorithm, byte[] input)
{
IDigest digest = DigestUtilities.GetDigest(algorithm);
int length = input.Length;
return DigestUtilities.DoFinal(digest);
}
// Token: 0x06009CBA RID: 40122 RVA: 0x0020BCBC File Offset: 0x00209EBC
[Token(Token = "0x6009CBA")]
[Address(RVA = "0x19A99C0", Offset = "0x19A87C0", VA = "0x1819A99C0")]
public static byte[] DoFinal(IDigest digest)
{
byte[] array = new byte[0];
int num = 0;
num += num;
num++;
return array;
}
// Token: 0x06009CBB RID: 40123 RVA: 0x0020BCE8 File Offset: 0x00209EE8
[Token(Token = "0x6009CBB")]
[Address(RVA = "0x19A9920", Offset = "0x19A8720", VA = "0x1819A9920")]
public static byte[] DoFinal(IDigest digest, byte[] input)
{
int length = input.Length;
return DigestUtilities.DoFinal(digest);
}
// Token: 0x040069AF RID: 27055
[Token(Token = "0x40069AF")]
private static readonly IDictionary algorithms;
// Token: 0x040069B0 RID: 27056
[Token(Token = "0x40069B0")]
private static readonly IDictionary oids;
// Token: 0x020019A6 RID: 6566
[Token(Token = "0x20019A6")]
private enum DigestAlgorithm
{
// Token: 0x040069B2 RID: 27058
[Token(Token = "0x40069B2")]
BLAKE2B_160,
// Token: 0x040069B3 RID: 27059
[Token(Token = "0x40069B3")]
BLAKE2B_256,
// Token: 0x040069B4 RID: 27060
[Token(Token = "0x40069B4")]
BLAKE2B_384,
// Token: 0x040069B5 RID: 27061
[Token(Token = "0x40069B5")]
BLAKE2B_512,
// Token: 0x040069B6 RID: 27062
[Token(Token = "0x40069B6")]
BLAKE2S_128,
// Token: 0x040069B7 RID: 27063
[Token(Token = "0x40069B7")]
BLAKE2S_160,
// Token: 0x040069B8 RID: 27064
[Token(Token = "0x40069B8")]
BLAKE2S_224,
// Token: 0x040069B9 RID: 27065
[Token(Token = "0x40069B9")]
BLAKE2S_256,
// Token: 0x040069BA RID: 27066
[Token(Token = "0x40069BA")]
DSTU7564_256,
// Token: 0x040069BB RID: 27067
[Token(Token = "0x40069BB")]
DSTU7564_384,
// Token: 0x040069BC RID: 27068
[Token(Token = "0x40069BC")]
DSTU7564_512,
// Token: 0x040069BD RID: 27069
[Token(Token = "0x40069BD")]
GOST3411,
// Token: 0x040069BE RID: 27070
[Token(Token = "0x40069BE")]
GOST3411_2012_256,
// Token: 0x040069BF RID: 27071
[Token(Token = "0x40069BF")]
GOST3411_2012_512,
// Token: 0x040069C0 RID: 27072
[Token(Token = "0x40069C0")]
KECCAK_224,
// Token: 0x040069C1 RID: 27073
[Token(Token = "0x40069C1")]
KECCAK_256,
// Token: 0x040069C2 RID: 27074
[Token(Token = "0x40069C2")]
KECCAK_288,
// Token: 0x040069C3 RID: 27075
[Token(Token = "0x40069C3")]
KECCAK_384,
// Token: 0x040069C4 RID: 27076
[Token(Token = "0x40069C4")]
KECCAK_512,
// Token: 0x040069C5 RID: 27077
[Token(Token = "0x40069C5")]
MD2,
// Token: 0x040069C6 RID: 27078
[Token(Token = "0x40069C6")]
MD4,
// Token: 0x040069C7 RID: 27079
[Token(Token = "0x40069C7")]
MD5,
// Token: 0x040069C8 RID: 27080
[Token(Token = "0x40069C8")]
NONE,
// Token: 0x040069C9 RID: 27081
[Token(Token = "0x40069C9")]
RIPEMD128,
// Token: 0x040069CA RID: 27082
[Token(Token = "0x40069CA")]
RIPEMD160,
// Token: 0x040069CB RID: 27083
[Token(Token = "0x40069CB")]
RIPEMD256,
// Token: 0x040069CC RID: 27084
[Token(Token = "0x40069CC")]
RIPEMD320,
// Token: 0x040069CD RID: 27085
[Token(Token = "0x40069CD")]
SHA_1,
// Token: 0x040069CE RID: 27086
[Token(Token = "0x40069CE")]
SHA_224,
// Token: 0x040069CF RID: 27087
[Token(Token = "0x40069CF")]
SHA_256,
// Token: 0x040069D0 RID: 27088
[Token(Token = "0x40069D0")]
SHA_384,
// Token: 0x040069D1 RID: 27089
[Token(Token = "0x40069D1")]
SHA_512,
// Token: 0x040069D2 RID: 27090
[Token(Token = "0x40069D2")]
SHA_512_224,
// Token: 0x040069D3 RID: 27091
[Token(Token = "0x40069D3")]
SHA_512_256,
// Token: 0x040069D4 RID: 27092
[Token(Token = "0x40069D4")]
SHA3_224,
// Token: 0x040069D5 RID: 27093
[Token(Token = "0x40069D5")]
SHA3_256,
// Token: 0x040069D6 RID: 27094
[Token(Token = "0x40069D6")]
SHA3_384,
// Token: 0x040069D7 RID: 27095
[Token(Token = "0x40069D7")]
SHA3_512,
// Token: 0x040069D8 RID: 27096
[Token(Token = "0x40069D8")]
SHAKE128,
// Token: 0x040069D9 RID: 27097
[Token(Token = "0x40069D9")]
SHAKE256,
// Token: 0x040069DA RID: 27098
[Token(Token = "0x40069DA")]
SM3,
// Token: 0x040069DB RID: 27099
[Token(Token = "0x40069DB")]
TIGER,
// Token: 0x040069DC RID: 27100
[Token(Token = "0x40069DC")]
WHIRLPOOL
}
}
}
@@ -0,0 +1,354 @@
using System;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using BestHTTP.SecureProtocol.Org.BouncyCastle.X509;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019A7 RID: 6567
[Token(Token = "0x20019A7")]
public sealed class DotNetUtilities
{
// Token: 0x06009CBC RID: 40124 RVA: 0x0020BD08 File Offset: 0x00209F08
[Token(Token = "0x6009CBC")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private DotNetUtilities()
{
}
// Token: 0x06009CBD RID: 40125 RVA: 0x0020BD1C File Offset: 0x00209F1C
[Token(Token = "0x6009CBD")]
[Address(RVA = "0x19AD960", Offset = "0x19AC760", VA = "0x1819AD960")]
public static global::System.Security.Cryptography.X509Certificates.X509Certificate ToX509Certificate(X509CertificateStructure x509Struct)
{
return new global::System.Security.Cryptography.X509Certificates.X509Certificate(x509Struct.GetDerEncoded());
}
// Token: 0x06009CBE RID: 40126 RVA: 0x0020BD3C File Offset: 0x00209F3C
[Token(Token = "0x6009CBE")]
[Address(RVA = "0x19AD9D0", Offset = "0x19AC7D0", VA = "0x1819AD9D0")]
public static global::System.Security.Cryptography.X509Certificates.X509Certificate ToX509Certificate(BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate x509Cert)
{
AsymmetricKeyParameter publicKey = x509Cert.GetPublicKey();
global::System.Security.Cryptography.X509Certificates.X509Certificate x509Certificate;
return x509Certificate;
}
// Token: 0x06009CBF RID: 40127 RVA: 0x0020BD58 File Offset: 0x00209F58
[Token(Token = "0x6009CBF")]
[Address(RVA = "0x19AC4E0", Offset = "0x19AB2E0", VA = "0x1819AC4E0")]
public static BestHTTP.SecureProtocol.Org.BouncyCastle.X509.X509Certificate FromX509Certificate(global::System.Security.Cryptography.X509Certificates.X509Certificate x509Cert)
{
X509CertificateParser x509CertificateParser = new X509CertificateParser();
byte[] publicKey = x509Cert.GetPublicKey();
return x509CertificateParser.ReadCertificate(publicKey);
}
// Token: 0x06009CC0 RID: 40128 RVA: 0x0020BD80 File Offset: 0x00209F80
[Token(Token = "0x6009CC0")]
[Address(RVA = "0x19AC560", Offset = "0x19AB360", VA = "0x1819AC560")]
public static AsymmetricCipherKeyPair GetDsaKeyPair(DSA dsa)
{
AsymmetricCipherKeyPair asymmetricCipherKeyPair;
return asymmetricCipherKeyPair;
}
// Token: 0x06009CC1 RID: 40129 RVA: 0x0020BD94 File Offset: 0x00209F94
[Token(Token = "0x6009CC1")]
[Address(RVA = "0x19AC5D0", Offset = "0x19AB3D0", VA = "0x1819AC5D0")]
public static AsymmetricCipherKeyPair GetDsaKeyPair(DSAParameters dp)
{
if (dp.Seed != (ulong)0L)
{
byte[] seed = dp.Seed;
}
int num = 0;
byte[] g;
BigInteger bigInteger = new BigInteger(1, g);
g = dp.G;
BigInteger bigInteger2;
BigInteger bigInteger3;
DsaParameters dsaParameters = new DsaParameters(bigInteger2, bigInteger3, bigInteger, num);
BigInteger bigInteger4;
DsaPublicKeyParameters dsaPublicKeyParameters = new DsaPublicKeyParameters(bigInteger4, dsaParameters);
BigInteger bigInteger5;
DsaPrivateKeyParameters dsaPrivateKeyParameters = new DsaPrivateKeyParameters(bigInteger5, dsaParameters);
return new AsymmetricCipherKeyPair(dsaPublicKeyParameters, dsaPrivateKeyParameters);
}
// Token: 0x06009CC2 RID: 40130 RVA: 0x0020BDF4 File Offset: 0x00209FF4
[Token(Token = "0x6009CC2")]
[Address(RVA = "0x19AC7C0", Offset = "0x19AB5C0", VA = "0x1819AC7C0")]
public static DsaPublicKeyParameters GetDsaPublicKey(DSA dsa)
{
int num = 0;
BigInteger bigInteger;
BigInteger bigInteger2;
BigInteger bigInteger3;
DsaParameters dsaParameters = new DsaParameters(bigInteger, bigInteger2, bigInteger3, num);
BigInteger bigInteger4;
return new DsaPublicKeyParameters(bigInteger4, dsaParameters);
}
// Token: 0x06009CC3 RID: 40131 RVA: 0x0020BE20 File Offset: 0x0020A020
[Token(Token = "0x6009CC3")]
[Address(RVA = "0x19AC980", Offset = "0x19AB780", VA = "0x1819AC980")]
public static DsaPublicKeyParameters GetDsaPublicKey(DSAParameters dp)
{
if (dp.Seed != (ulong)0L)
{
byte[] seed = dp.Seed;
}
int num = 0;
byte[] g;
BigInteger bigInteger = new BigInteger(1, g);
g = dp.G;
BigInteger bigInteger2;
BigInteger bigInteger3;
DsaParameters dsaParameters = new DsaParameters(bigInteger2, bigInteger3, bigInteger, num);
BigInteger bigInteger4;
return new DsaPublicKeyParameters(bigInteger4, dsaParameters);
}
// Token: 0x06009CC4 RID: 40132 RVA: 0x0020BE6C File Offset: 0x0020A06C
[Token(Token = "0x6009CC4")]
[Address(RVA = "0x19ACF40", Offset = "0x19ABD40", VA = "0x1819ACF40")]
public static AsymmetricCipherKeyPair GetRsaKeyPair(RSA rsa)
{
byte[] array;
byte b = array[0];
byte b2 = array[2];
AsymmetricCipherKeyPair asymmetricCipherKeyPair;
return asymmetricCipherKeyPair;
}
// Token: 0x06009CC5 RID: 40133 RVA: 0x0020BE90 File Offset: 0x0020A090
[Token(Token = "0x6009CC5")]
[Address(RVA = "0x19ACD10", Offset = "0x19ABB10", VA = "0x1819ACD10")]
public static AsymmetricCipherKeyPair GetRsaKeyPair(RSAParameters rp)
{
int num;
BigInteger bigInteger;
BigInteger bigInteger2;
RsaKeyParameters rsaKeyParameters = new RsaKeyParameters(num != 0, bigInteger, bigInteger2);
num = 0;
byte[] p;
BigInteger bigInteger3 = new BigInteger(1, p);
p = rp.P;
BigInteger bigInteger4 = new BigInteger(1, p);
byte[] dp;
BigInteger bigInteger5 = new BigInteger(1, dp);
dp = rp.DP;
BigInteger bigInteger6 = new BigInteger(1, dp);
BigInteger bigInteger7 = new BigInteger(1, dp);
AsymmetricCipherKeyPair asymmetricCipherKeyPair;
return asymmetricCipherKeyPair;
}
// Token: 0x06009CC6 RID: 40134 RVA: 0x0020BEF0 File Offset: 0x0020A0F0
[Token(Token = "0x6009CC6")]
[Address(RVA = "0x19ACFB0", Offset = "0x19ABDB0", VA = "0x1819ACFB0")]
public static RsaKeyParameters GetRsaPublicKey(RSA rsa)
{
int num;
BigInteger bigInteger;
BigInteger bigInteger2;
RsaKeyParameters rsaKeyParameters = new RsaKeyParameters(num != 0, bigInteger, bigInteger2);
num = 0;
return rsaKeyParameters;
}
// Token: 0x06009CC7 RID: 40135 RVA: 0x0020BF14 File Offset: 0x0020A114
[Token(Token = "0x6009CC7")]
[Address(RVA = "0x19AD0B0", Offset = "0x19ABEB0", VA = "0x1819AD0B0")]
public static RsaKeyParameters GetRsaPublicKey(RSAParameters rp)
{
int num;
BigInteger bigInteger;
BigInteger bigInteger2;
RsaKeyParameters rsaKeyParameters = new RsaKeyParameters(num != 0, bigInteger, bigInteger2);
num = 0;
return rsaKeyParameters;
}
// Token: 0x06009CC8 RID: 40136 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6009CC8")]
[Address(RVA = "0x19ACB00", Offset = "0x19AB900", VA = "0x1819ACB00")]
public static AsymmetricCipherKeyPair GetKeyPair(AsymmetricAlgorithm privateKey)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06009CC9 RID: 40137 RVA: 0x0020BF30 File Offset: 0x0020A130
[Token(Token = "0x6009CC9")]
[Address(RVA = "0x19AD750", Offset = "0x19AC550", VA = "0x1819AD750")]
public static RSA ToRSA(RsaKeyParameters rsaKey)
{
int num = 0;
byte[] array = rsaKey.modulus.ToByteArrayUnsigned();
BigInteger exponent = rsaKey.exponent;
byte[] array2 = exponent.ToByteArrayUnsigned();
int length = array.Length;
byte[] array3 = DotNetUtilities.ConvertRSAParametersField(exponent, length);
return DotNetUtilities.CreateRSAProvider(num);
}
// Token: 0x06009CCA RID: 40138 RVA: 0x0020BF78 File Offset: 0x0020A178
[Token(Token = "0x6009CCA")]
[Address(RVA = "0x19AD610", Offset = "0x19AC410", VA = "0x1819AD610")]
public static RSA ToRSA(RsaKeyParameters rsaKey, CspParameters csp)
{
int num = 0;
byte[] array = rsaKey.modulus.ToByteArrayUnsigned();
BigInteger exponent = rsaKey.exponent;
byte[] array2 = exponent.ToByteArrayUnsigned();
int length = array.Length;
byte[] array3 = DotNetUtilities.ConvertRSAParametersField(exponent, length);
RSAParameters rsaparameters = new RSACryptoServiceProvider(csp).ExportParameters(num != 0);
throw new NullReferenceException();
}
// Token: 0x06009CCB RID: 40139 RVA: 0x0020BFC8 File Offset: 0x0020A1C8
[Token(Token = "0x6009CCB")]
[Address(RVA = "0x19AD910", Offset = "0x19AC710", VA = "0x1819AD910")]
public static RSA ToRSA(RsaPrivateCrtKeyParameters privKey)
{
RSAParameters rsaparameters;
byte[] p = rsaparameters.P;
byte[] dp = rsaparameters.DP;
byte[] inverseQ = rsaparameters.InverseQ;
RSA rsa;
return rsa;
}
// Token: 0x06009CCC RID: 40140 RVA: 0x0020BFEC File Offset: 0x0020A1EC
[Token(Token = "0x6009CCC")]
[Address(RVA = "0x19AD4D0", Offset = "0x19AC2D0", VA = "0x1819AD4D0")]
public static RSA ToRSA(RsaPrivateCrtKeyParameters privKey, CspParameters csp)
{
RSAParameters rsaparameters;
byte[] p = rsaparameters.P;
byte[] dp = rsaparameters.DP;
byte[] inverseQ = rsaparameters.InverseQ;
RSACryptoServiceProvider rsacryptoServiceProvider = new RSACryptoServiceProvider(csp);
throw new NullReferenceException();
}
// Token: 0x06009CCD RID: 40141 RVA: 0x0020C01C File Offset: 0x0020A21C
[Token(Token = "0x6009CCD")]
[Address(RVA = "0x19AD5C0", Offset = "0x19AC3C0", VA = "0x1819AD5C0")]
public static RSA ToRSA(RsaPrivateKeyStructure privKey)
{
RSAParameters rsaparameters;
byte[] p = rsaparameters.P;
byte[] dp = rsaparameters.DP;
byte[] inverseQ = rsaparameters.InverseQ;
RSA rsa;
return rsa;
}
// Token: 0x06009CCE RID: 40142 RVA: 0x0020C040 File Offset: 0x0020A240
[Token(Token = "0x6009CCE")]
[Address(RVA = "0x19AD820", Offset = "0x19AC620", VA = "0x1819AD820")]
public static RSA ToRSA(RsaPrivateKeyStructure privKey, CspParameters csp)
{
RSAParameters rsaparameters;
byte[] p = rsaparameters.P;
byte[] dp = rsaparameters.DP;
byte[] inverseQ = rsaparameters.InverseQ;
RSACryptoServiceProvider rsacryptoServiceProvider = new RSACryptoServiceProvider(csp);
throw new NullReferenceException();
}
// Token: 0x06009CCF RID: 40143 RVA: 0x0020C070 File Offset: 0x0020A270
[Token(Token = "0x6009CCF")]
[Address(RVA = "0x19AD170", Offset = "0x19ABF70", VA = "0x1819AD170")]
public static RSAParameters ToRSAParameters(RsaKeyParameters rsaKey)
{
if ("{il2cpp array field il2cppMethodInfo->}" == (ulong)0L)
{
}
rsaKey.privateKey = false;
rsaKey.exponent = 0;
throw new NullReferenceException();
}
// Token: 0x06009CD0 RID: 40144 RVA: 0x0020C09C File Offset: 0x0020A29C
[Token(Token = "0x6009CD0")]
[Address(RVA = "0x19AD380", Offset = "0x19AC180", VA = "0x1819AD380")]
public static RSAParameters ToRSAParameters(RsaPrivateCrtKeyParameters privKey)
{
byte[] array;
privKey.privateKey = array != null;
byte[] array2;
privKey.exponent = array2;
byte[] array3;
privKey.p = array3;
throw new NullReferenceException();
}
// Token: 0x06009CD1 RID: 40145 RVA: 0x0020C0C8 File Offset: 0x0020A2C8
[Token(Token = "0x6009CD1")]
[Address(RVA = "0x19AD230", Offset = "0x19AC030", VA = "0x1819AD230")]
public static RSAParameters ToRSAParameters(RsaPrivateKeyStructure privKey)
{
byte[] array;
privKey.modulus = array;
byte[] array2;
privKey.privateExponent = array2;
byte[] array3;
privKey.prime2 = array3;
throw new NullReferenceException();
}
// Token: 0x06009CD2 RID: 40146 RVA: 0x0020C0F4 File Offset: 0x0020A2F4
[Token(Token = "0x6009CD2")]
[Address(RVA = "0x19AC220", Offset = "0x19AB020", VA = "0x1819AC220")]
private static byte[] ConvertRSAParametersField(BigInteger n, int size)
{
byte[] array = n.ToByteArrayUnsigned();
if (array.Length != size)
{
byte[] array2 = new byte[size];
int length = array.Length;
int num = 0;
Array.Copy(array, num, array2, size, length);
}
return array;
}
// Token: 0x06009CD3 RID: 40147 RVA: 0x0020C134 File Offset: 0x0020A334
[Token(Token = "0x6009CD3")]
[Address(RVA = "0x19AC3B0", Offset = "0x19AB1B0", VA = "0x1819AC3B0")]
private static RSA CreateRSAProvider(RSAParameters rp)
{
CspParameters cspParameters = new CspParameters();
Guid guid = Guid.NewGuid();
string text = string.Format("BouncyCastle-{0}", guid);
cspParameters.KeyContainerName = text;
RSACryptoServiceProvider rsacryptoServiceProvider = new RSACryptoServiceProvider(cspParameters);
byte[] p = rp.P;
byte[] dp = rp.DP;
byte[] inverseQ = rp.InverseQ;
throw new NullReferenceException();
}
// Token: 0x06009CD4 RID: 40148 RVA: 0x0020C184 File Offset: 0x0020A384
[Token(Token = "0x6009CD4")]
[Address(RVA = "0x19AC300", Offset = "0x19AB100", VA = "0x1819AC300")]
private static RSA CreateRSAProvider(RSAParameters rp, CspParameters csp)
{
RSACryptoServiceProvider rsacryptoServiceProvider = new RSACryptoServiceProvider(csp);
byte[] p = rp.P;
byte[] dp = rp.DP;
byte[] inverseQ = rp.InverseQ;
throw new NullReferenceException();
}
}
}
@@ -0,0 +1,28 @@
using System;
using System.IO;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x0200199E RID: 6558
[Token(Token = "0x200199E")]
[Serializable]
public class EncryptionException : IOException
{
// Token: 0x06009C9B RID: 40091 RVA: 0x0020A9C8 File Offset: 0x00208BC8
[Token(Token = "0x6009C9B")]
[Address(RVA = "0x424140", Offset = "0x422F40", VA = "0x180424140")]
public EncryptionException(string message)
: base(message)
{
}
// Token: 0x06009C9C RID: 40092 RVA: 0x0020A9DC File Offset: 0x00208BDC
[Token(Token = "0x6009C9C")]
[Address(RVA = "0x18E71C0", Offset = "0x18E5FC0", VA = "0x1818E71C0")]
public EncryptionException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019A8 RID: 6568
[Token(Token = "0x20019A8")]
[Serializable]
public class GeneralSecurityException : Exception
{
// Token: 0x06009CD5 RID: 40149 RVA: 0x0020C1B4 File Offset: 0x0020A3B4
[Token(Token = "0x6009CD5")]
[Address(RVA = "0x19A5D40", Offset = "0x19A4B40", VA = "0x1819A5D40")]
public GeneralSecurityException()
{
}
// Token: 0x06009CD6 RID: 40150 RVA: 0x0020C1C8 File Offset: 0x0020A3C8
[Token(Token = "0x6009CD6")]
[Address(RVA = "0x19A5E20", Offset = "0x19A4C20", VA = "0x1819A5E20")]
public GeneralSecurityException(string message)
: base(message)
{
}
// Token: 0x06009CD7 RID: 40151 RVA: 0x0020C1DC File Offset: 0x0020A3DC
[Token(Token = "0x6009CD7")]
[Address(RVA = "0x19A5DA0", Offset = "0x19A4BA0", VA = "0x1819A5DA0")]
public GeneralSecurityException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,331 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Generators;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019A9 RID: 6569
[Token(Token = "0x20019A9")]
public sealed class GeneratorUtilities
{
// Token: 0x06009CD8 RID: 40152 RVA: 0x0020C1F4 File Offset: 0x0020A3F4
[Token(Token = "0x6009CD8")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private GeneratorUtilities()
{
}
// Token: 0x06009CD9 RID: 40153 RVA: 0x0020C208 File Offset: 0x0020A408
[Token(Token = "0x6009CD9")]
[Address(RVA = "0x19AEEF0", Offset = "0x19ADCF0", VA = "0x1819AEEF0")]
static GeneratorUtilities()
{
/*
An exception occurred when decompiling this method (06009CD9)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Security.GeneratorUtilities::.cctor()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_F31:
stelem:string([mscorlib]System.String, ldloc:string[](var_140_F12), ldc.i4:int32(1), ldstr:string("HMACSHA1"))
}
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: 0x06009CDA RID: 40154 RVA: 0x0020D154 File Offset: 0x0020B354
[Token(Token = "0x6009CDA")]
[Address(RVA = "0x19ADA50", Offset = "0x19AC850", VA = "0x1819ADA50")]
private static void AddDefaultKeySizeEntries(int size, params string[] algorithms)
{
int num = 0;
int length = algorithms.Length;
if (num < length)
{
IDictionary dictionary = GeneratorUtilities.defaultKeySizes;
num++;
}
}
// Token: 0x06009CDB RID: 40155 RVA: 0x0020D180 File Offset: 0x0020B380
[Token(Token = "0x6009CDB")]
[Address(RVA = "0x19ADD80", Offset = "0x19ACB80", VA = "0x1819ADD80")]
private static void AddKgAlgorithm(string canonicalName, params object[] aliases)
{
IDictionary dictionary = GeneratorUtilities.kgAlgorithms;
string text = Platform.ToUpperInvariant(canonicalName);
int num = 0;
int length = aliases.Length;
if (num < length)
{
object obj = aliases[num];
IDictionary dictionary2 = GeneratorUtilities.kgAlgorithms;
int hashCode = obj.GetHashCode();
num++;
}
}
// Token: 0x06009CDC RID: 40156 RVA: 0x0020D1CC File Offset: 0x0020B3CC
[Token(Token = "0x6009CDC")]
[Address(RVA = "0x19ADF40", Offset = "0x19ACD40", VA = "0x1819ADF40")]
private static void AddKpgAlgorithm(string canonicalName, params object[] aliases)
{
IDictionary dictionary = GeneratorUtilities.kpgAlgorithms;
string text = Platform.ToUpperInvariant(canonicalName);
int num = 0;
int length = aliases.Length;
if (num < length)
{
object obj = aliases[num];
IDictionary dictionary2 = GeneratorUtilities.kpgAlgorithms;
int hashCode = obj.GetHashCode();
num++;
}
}
// Token: 0x06009CDD RID: 40157 RVA: 0x0020D218 File Offset: 0x0020B418
[Token(Token = "0x6009CDD")]
[Address(RVA = "0x19ADB50", Offset = "0x19AC950", VA = "0x1819ADB50")]
private static void AddHMacKeyGenerator(string algorithm, params object[] aliases)
{
string text = "HMAC" + algorithm;
IDictionary dictionary = GeneratorUtilities.kgAlgorithms;
IDictionary dictionary2 = GeneratorUtilities.kgAlgorithms;
string text2 = "HMAC-" + algorithm;
IDictionary dictionary3 = GeneratorUtilities.kgAlgorithms;
string text3 = "HMAC/" + algorithm;
int num = 0;
int length = aliases.Length;
if (num < length)
{
object obj = aliases[num];
IDictionary dictionary4 = GeneratorUtilities.kgAlgorithms;
int hashCode = obj.GetHashCode();
num++;
}
}
// Token: 0x06009CDE RID: 40158 RVA: 0x0020D294 File Offset: 0x0020B494
[Token(Token = "0x6009CDE")]
[Address(RVA = "0x19AE210", Offset = "0x19AD010", VA = "0x1819AE210")]
internal static string GetCanonicalKeyGeneratorAlgorithm(string algorithm)
{
string text;
for (;;)
{
IDictionary dictionary = GeneratorUtilities.kgAlgorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
break;
}
if (text != 0)
{
goto Block_1;
}
}
return text;
Block_1:
throw new NullReferenceException();
}
// Token: 0x06009CDF RID: 40159 RVA: 0x0020D2C0 File Offset: 0x0020B4C0
[Token(Token = "0x6009CDF")]
[Address(RVA = "0x19AE2F0", Offset = "0x19AD0F0", VA = "0x1819AE2F0")]
internal static string GetCanonicalKeyPairGeneratorAlgorithm(string algorithm)
{
string text;
for (;;)
{
IDictionary dictionary = GeneratorUtilities.kpgAlgorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
break;
}
if (text != 0)
{
goto Block_1;
}
}
return text;
Block_1:
throw new NullReferenceException();
}
// Token: 0x06009CE0 RID: 40160 RVA: 0x0020D2EC File Offset: 0x0020B4EC
[Token(Token = "0x6009CE0")]
[Address(RVA = "0x19AE630", Offset = "0x19AD430", VA = "0x1819AE630")]
public static CipherKeyGenerator GetKeyGenerator(DerObjectIdentifier oid)
{
return GeneratorUtilities.GetKeyGenerator(oid.identifier);
}
// Token: 0x06009CE1 RID: 40161 RVA: 0x0020D30C File Offset: 0x0020B50C
[Token(Token = "0x6009CE1")]
[Address(RVA = "0x19AE690", Offset = "0x19AD490", VA = "0x1819AE690")]
public static CipherKeyGenerator GetKeyGenerator(string algorithm)
{
string canonicalKeyGeneratorAlgorithm = GeneratorUtilities.GetCanonicalKeyGeneratorAlgorithm(algorithm);
if (canonicalKeyGeneratorAlgorithm != 0)
{
int num = GeneratorUtilities.FindDefaultKeySize(canonicalKeyGeneratorAlgorithm);
if (num == -1)
{
goto IL_6C;
}
if (!string.Equals(canonicalKeyGeneratorAlgorithm, "DES"))
{
if (!string.Equals(canonicalKeyGeneratorAlgorithm, "DESEDE") && !string.Equals(canonicalKeyGeneratorAlgorithm, "DESEDE3"))
{
return new CipherKeyGenerator(num);
}
DesEdeKeyGenerator desEdeKeyGenerator = new DesEdeKeyGenerator(num);
}
DesKeyGenerator desKeyGenerator = new DesKeyGenerator(num);
}
SecurityUtilityException ex = new SecurityUtilityException("KeyGenerator " + algorithm + " not recognised.");
IL_6C:
string[] array = new string[5];
throw new NullReferenceException();
}
// Token: 0x06009CE2 RID: 40162 RVA: 0x0020D3F4 File Offset: 0x0020B5F4
[Token(Token = "0x6009CE2")]
[Address(RVA = "0x19AE940", Offset = "0x19AD740", VA = "0x1819AE940")]
public static IAsymmetricCipherKeyPairGenerator GetKeyPairGenerator(DerObjectIdentifier oid)
{
return GeneratorUtilities.GetKeyPairGenerator(oid.identifier);
}
// Token: 0x06009CE3 RID: 40163 RVA: 0x0020D414 File Offset: 0x0020B614
[Token(Token = "0x6009CE3")]
[Address(RVA = "0x19AE9A0", Offset = "0x19AD7A0", VA = "0x1819AE9A0")]
public static IAsymmetricCipherKeyPairGenerator GetKeyPairGenerator(string algorithm)
{
string text;
do
{
IDictionary dictionary = GeneratorUtilities.kpgAlgorithms;
text = Platform.ToUpperInvariant(algorithm);
}
while (text == 0 || text == 0);
if (text == 0)
{
if (text == 0)
{
bool flag = Platform.StartsWith(text, "EC");
if (!flag)
{
if (!flag)
{
if (!flag)
{
if (!flag)
{
if (!flag)
{
if (!flag)
{
if (!flag)
{
if (!flag)
{
string[] array = new string[5];
throw new NullReferenceException();
}
X448KeyPairGenerator x448KeyPairGenerator = new X448KeyPairGenerator();
}
X25519KeyPairGenerator x25519KeyPairGenerator = new X25519KeyPairGenerator();
}
RsaKeyPairGenerator rsaKeyPairGenerator = new RsaKeyPairGenerator();
}
Gost3410KeyPairGenerator gost3410KeyPairGenerator = new Gost3410KeyPairGenerator();
}
ElGamalKeyPairGenerator elGamalKeyPairGenerator = new ElGamalKeyPairGenerator();
}
Ed448KeyPairGenerator ed448KeyPairGenerator = new Ed448KeyPairGenerator();
}
Ed25519KeyPairGenerator ed25519KeyPairGenerator = new Ed25519KeyPairGenerator();
}
ECKeyPairGenerator eckeyPairGenerator = new ECKeyPairGenerator(text);
}
DsaKeyPairGenerator dsaKeyPairGenerator = new DsaKeyPairGenerator();
}
DHKeyPairGenerator dhkeyPairGenerator = new DHKeyPairGenerator();
throw new NullReferenceException();
}
// Token: 0x06009CE4 RID: 40164 RVA: 0x0020D528 File Offset: 0x0020B728
[Token(Token = "0x6009CE4")]
[Address(RVA = "0x19AE5D0", Offset = "0x19AD3D0", VA = "0x1819AE5D0")]
internal static int GetDefaultKeySize(DerObjectIdentifier oid)
{
return GeneratorUtilities.GetDefaultKeySize(oid.identifier);
}
// Token: 0x06009CE5 RID: 40165 RVA: 0x0020D548 File Offset: 0x0020B748
[Token(Token = "0x6009CE5")]
[Address(RVA = "0x19AE3D0", Offset = "0x19AD1D0", VA = "0x1819AE3D0")]
internal static int GetDefaultKeySize(string algorithm)
{
/*
An exception occurred when decompiling this method (06009CE5)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Security.GeneratorUtilities::GetDefaultKeySize(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_85:
stloc:SecurityUtilityException(var_4_9A, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("KeyGenerator "), ldloc:string(algorithm), ldstr:string(" not recognised."))))
}
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: 0x06009CE6 RID: 40166 RVA: 0x0020D5F0 File Offset: 0x0020B7F0
[Token(Token = "0x6009CE6")]
[Address(RVA = "0x19AE100", Offset = "0x19ACF00", VA = "0x1819AE100")]
private static int FindDefaultKeySize(string canonicalName)
{
IDictionary dictionary = GeneratorUtilities.defaultKeySizes;
IDictionary dictionary2 = GeneratorUtilities.defaultKeySizes;
IDictionary dictionary3 = GeneratorUtilities.kgAlgorithms;
return -1;
}
// Token: 0x040069DD RID: 27101
[Token(Token = "0x40069DD")]
private static readonly IDictionary kgAlgorithms;
// Token: 0x040069DE RID: 27102
[Token(Token = "0x40069DE")]
private static readonly IDictionary kpgAlgorithms;
// Token: 0x040069DF RID: 27103
[Token(Token = "0x40069DF")]
private static readonly IDictionary defaultKeySizes;
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019AA RID: 6570
[Token(Token = "0x20019AA")]
[Serializable]
public class InvalidKeyException : KeyException
{
// Token: 0x06009CE7 RID: 40167 RVA: 0x0020D618 File Offset: 0x0020B818
[Token(Token = "0x6009CE7")]
[Address(RVA = "0x1B15680", Offset = "0x1B14480", VA = "0x181B15680")]
public InvalidKeyException()
{
}
// Token: 0x06009CE8 RID: 40168 RVA: 0x0020D62C File Offset: 0x0020B82C
[Token(Token = "0x6009CE8")]
[Address(RVA = "0x1B15670", Offset = "0x1B14470", VA = "0x181B15670")]
public InvalidKeyException(string message)
: base(message)
{
}
// Token: 0x06009CE9 RID: 40169 RVA: 0x0020D640 File Offset: 0x0020B840
[Token(Token = "0x6009CE9")]
[Address(RVA = "0x1B15660", Offset = "0x1B14460", VA = "0x181B15660")]
public InvalidKeyException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019AB RID: 6571
[Token(Token = "0x20019AB")]
[Serializable]
public class InvalidParameterException : KeyException
{
// Token: 0x06009CEA RID: 40170 RVA: 0x0020D658 File Offset: 0x0020B858
[Token(Token = "0x6009CEA")]
[Address(RVA = "0x1B15680", Offset = "0x1B14480", VA = "0x181B15680")]
public InvalidParameterException()
{
}
// Token: 0x06009CEB RID: 40171 RVA: 0x0020D66C File Offset: 0x0020B86C
[Token(Token = "0x6009CEB")]
[Address(RVA = "0x1B15670", Offset = "0x1B14470", VA = "0x181B15670")]
public InvalidParameterException(string message)
: base(message)
{
}
// Token: 0x06009CEC RID: 40172 RVA: 0x0020D680 File Offset: 0x0020B880
[Token(Token = "0x6009CEC")]
[Address(RVA = "0x1B15660", Offset = "0x1B14460", VA = "0x181B15660")]
public InvalidParameterException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019AC RID: 6572
[Token(Token = "0x20019AC")]
[Serializable]
public class KeyException : GeneralSecurityException
{
// Token: 0x06009CED RID: 40173 RVA: 0x0020D698 File Offset: 0x0020B898
[Token(Token = "0x6009CED")]
[Address(RVA = "0x1B15680", Offset = "0x1B14480", VA = "0x181B15680")]
public KeyException()
{
}
// Token: 0x06009CEE RID: 40174 RVA: 0x0020D6AC File Offset: 0x0020B8AC
[Token(Token = "0x6009CEE")]
[Address(RVA = "0x1B15670", Offset = "0x1B14470", VA = "0x181B15670")]
public KeyException(string message)
: base(message)
{
}
// Token: 0x06009CEF RID: 40175 RVA: 0x0020D6C0 File Offset: 0x0020B8C0
[Token(Token = "0x6009CEF")]
[Address(RVA = "0x1B15660", Offset = "0x1B14460", VA = "0x181B15660")]
public KeyException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,201 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Iana;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Rosstandart;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019AD RID: 6573
[Token(Token = "0x20019AD")]
public sealed class MacUtilities
{
// Token: 0x06009CF0 RID: 40176 RVA: 0x0020D6D8 File Offset: 0x0020B8D8
[Token(Token = "0x6009CF0")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private MacUtilities()
{
}
// Token: 0x06009CF1 RID: 40177 RVA: 0x0020D6EC File Offset: 0x0020B8EC
[Token(Token = "0x6009CF1")]
[Address(RVA = "0x1B16430", Offset = "0x1B15230", VA = "0x181B16430")]
static MacUtilities()
{
IDictionary dictionary = Platform.CreateHashtable();
DerObjectIdentifier hmacMD = IanaObjectIdentifiers.HmacMD5;
DerObjectIdentifier hmacRipeMD = IanaObjectIdentifiers.HmacRipeMD160;
DerObjectIdentifier hmacSha = IanaObjectIdentifiers.HmacSha1;
DerObjectIdentifier hmacTiger = IanaObjectIdentifiers.HmacTiger;
DerObjectIdentifier idHmacWithSha = PkcsObjectIdentifiers.IdHmacWithSha1;
DerObjectIdentifier idHmacWithSha2 = PkcsObjectIdentifiers.IdHmacWithSha224;
DerObjectIdentifier idHmacWithSha3 = PkcsObjectIdentifiers.IdHmacWithSha256;
DerObjectIdentifier idHmacWithSha4 = PkcsObjectIdentifiers.IdHmacWithSha384;
DerObjectIdentifier idHmacWithSha5 = PkcsObjectIdentifiers.IdHmacWithSha512;
DerObjectIdentifier idHMacWithSha3_ = NistObjectIdentifiers.IdHMacWithSha3_224;
DerObjectIdentifier idHMacWithSha3_2 = NistObjectIdentifiers.IdHMacWithSha3_256;
DerObjectIdentifier idHMacWithSha3_3 = NistObjectIdentifiers.IdHMacWithSha3_384;
DerObjectIdentifier idHMacWithSha3_4 = NistObjectIdentifiers.IdHMacWithSha3_512;
DerObjectIdentifier id_tc26_hmac_gost_3411_12_ = RosstandartObjectIdentifiers.id_tc26_hmac_gost_3411_12_256;
DerObjectIdentifier id_tc26_hmac_gost_3411_12_2 = RosstandartObjectIdentifiers.id_tc26_hmac_gost_3411_12_512;
DerObjectIdentifier desEde3Cbc = PkcsObjectIdentifiers.DesEde3Cbc;
}
// Token: 0x06009CF2 RID: 40178 RVA: 0x0020D778 File Offset: 0x0020B978
[Token(Token = "0x6009CF2")]
[Address(RVA = "0x1B15A00", Offset = "0x1B14800", VA = "0x181B15A00")]
public static IMac GetMac(DerObjectIdentifier id)
{
return MacUtilities.GetMac(id.identifier);
}
// Token: 0x06009CF3 RID: 40179 RVA: 0x0020D798 File Offset: 0x0020B998
[Token(Token = "0x6009CF3")]
[Address(RVA = "0x1B15A60", Offset = "0x1B14860", VA = "0x181B15A60")]
public static IMac GetMac(string algorithm)
{
/*
An exception occurred when decompiling this method (06009CF3)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IMac BestHTTP.SecureProtocol.Org.BouncyCastle.Security.MacUtilities::GetMac(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_1BE:
stloc:SecurityUtilityException(var_34_1C5, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldloc:string(var_33)))
}
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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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: 0x06009CF4 RID: 40180 RVA: 0x0020D96C File Offset: 0x0020BB6C
[Token(Token = "0x6009CF4")]
[Address(RVA = "0x1B15950", Offset = "0x1B14750", VA = "0x181B15950")]
public static string GetAlgorithmName(DerObjectIdentifier oid)
{
throw new NullReferenceException();
}
// Token: 0x06009CF5 RID: 40181 RVA: 0x0020D980 File Offset: 0x0020BB80
[Token(Token = "0x6009CF5")]
[Address(RVA = "0x1B15690", Offset = "0x1B14490", VA = "0x181B15690")]
public static byte[] CalculateMac(string algorithm, ICipherParameters cp, byte[] input)
{
IMac mac = MacUtilities.GetMac(algorithm);
int num = 0;
if (num < input)
{
num += num;
num++;
}
int length = input.Length;
return MacUtilities.DoFinal(mac);
}
// Token: 0x06009CF6 RID: 40182 RVA: 0x0020D9BC File Offset: 0x0020BBBC
[Token(Token = "0x6009CF6")]
[Address(RVA = "0x1B157C0", Offset = "0x1B145C0", VA = "0x181B157C0")]
public static byte[] DoFinal(IMac mac)
{
byte[] array = new byte[0];
int num = 0;
num += num;
num++;
return array;
}
// Token: 0x06009CF7 RID: 40183 RVA: 0x0020D9E8 File Offset: 0x0020BBE8
[Token(Token = "0x6009CF7")]
[Address(RVA = "0x1B158B0", Offset = "0x1B146B0", VA = "0x181B158B0")]
public static byte[] DoFinal(IMac mac, byte[] input)
{
int length = input.Length;
return MacUtilities.DoFinal(mac);
}
// Token: 0x040069E0 RID: 27104
[Token(Token = "0x40069E0")]
private static readonly IDictionary algorithms;
}
}
@@ -0,0 +1,35 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019AE RID: 6574
[Token(Token = "0x20019AE")]
[Obsolete]
[Serializable]
public class NoSuchAlgorithmException : GeneralSecurityException
{
// Token: 0x06009CF8 RID: 40184 RVA: 0x0020DA08 File Offset: 0x0020BC08
[Token(Token = "0x6009CF8")]
[Address(RVA = "0x1B15680", Offset = "0x1B14480", VA = "0x181B15680")]
public NoSuchAlgorithmException()
{
}
// Token: 0x06009CF9 RID: 40185 RVA: 0x0020DA1C File Offset: 0x0020BC1C
[Token(Token = "0x6009CF9")]
[Address(RVA = "0x1B15670", Offset = "0x1B14470", VA = "0x181B15670")]
public NoSuchAlgorithmException(string message)
: base(message)
{
}
// Token: 0x06009CFA RID: 40186 RVA: 0x0020DA30 File Offset: 0x0020BC30
[Token(Token = "0x6009CFA")]
[Address(RVA = "0x1B15660", Offset = "0x1B14460", VA = "0x181B15660")]
public NoSuchAlgorithmException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,303 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019AF RID: 6575
[Token(Token = "0x20019AF")]
public sealed class ParameterUtilities
{
// Token: 0x06009CFB RID: 40187 RVA: 0x0020DA48 File Offset: 0x0020BC48
[Token(Token = "0x6009CFB")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private ParameterUtilities()
{
}
// Token: 0x06009CFC RID: 40188 RVA: 0x0020DA5C File Offset: 0x0020BC5C
[Token(Token = "0x6009CFC")]
[Address(RVA = "0x1B182B0", Offset = "0x1B170B0", VA = "0x181B182B0")]
static ParameterUtilities()
{
/*
An exception occurred when decompiling this method (06009CFC)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Security.ParameterUtilities::.cctor()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_76F:
stelem:string([mscorlib]System.String, ldloc:string[](var_75_726), ldc.i4:int32(3), ldstr:string("DESEDE3"))
call:void(ParameterUtilities::AddBasicIVSizeEntries, ldc.i4:int32(8), ldloc:string[](var_75_726))
}
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: 0x06009CFD RID: 40189 RVA: 0x0020E1EC File Offset: 0x0020C3EC
[Token(Token = "0x6009CFD")]
[Address(RVA = "0x1B170E0", Offset = "0x1B15EE0", VA = "0x181B170E0")]
private static void AddAlgorithm(string canonicalName, params object[] aliases)
{
IDictionary dictionary = ParameterUtilities.algorithms;
int num = 0;
int length = aliases.Length;
if (num < length)
{
object obj = aliases[num];
IDictionary dictionary2 = ParameterUtilities.algorithms;
int hashCode = obj.GetHashCode();
num++;
}
}
// Token: 0x06009CFE RID: 40190 RVA: 0x0020E230 File Offset: 0x0020C430
[Token(Token = "0x6009CFE")]
[Address(RVA = "0x1B17240", Offset = "0x1B16040", VA = "0x181B17240")]
private static void AddBasicIVSizeEntries(int size, params string[] algorithms)
{
int num = 0;
int length = algorithms.Length;
if (num < length)
{
IDictionary dictionary = ParameterUtilities.basicIVSizes;
num++;
}
}
// Token: 0x06009CFF RID: 40191 RVA: 0x0020E25C File Offset: 0x0020C45C
[Token(Token = "0x6009CFF")]
[Address(RVA = "0x1B17D80", Offset = "0x1B16B80", VA = "0x181B17D80")]
public static string GetCanonicalAlgorithmName(string algorithm)
{
string text;
for (;;)
{
IDictionary dictionary = ParameterUtilities.algorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
break;
}
if (text != 0)
{
goto Block_1;
}
}
return text;
Block_1:
throw new NullReferenceException();
}
// Token: 0x06009D00 RID: 40192 RVA: 0x0020E288 File Offset: 0x0020C488
[Token(Token = "0x6009D00")]
[Address(RVA = "0x1B177D0", Offset = "0x1B165D0", VA = "0x181B177D0")]
public static KeyParameter CreateKeyParameter(DerObjectIdentifier algOid, byte[] keyBytes)
{
string identifier = algOid.identifier;
int length = keyBytes.Length;
int num = 0;
return ParameterUtilities.CreateKeyParameter(identifier, keyBytes, num, length);
}
// Token: 0x06009D01 RID: 40193 RVA: 0x0020E2B4 File Offset: 0x0020C4B4
[Token(Token = "0x6009D01")]
[Address(RVA = "0x1B17520", Offset = "0x1B16320", VA = "0x181B17520")]
public static KeyParameter CreateKeyParameter(string algorithm, byte[] keyBytes)
{
int length = keyBytes.Length;
int num = 0;
return ParameterUtilities.CreateKeyParameter(algorithm, keyBytes, num, length);
}
// Token: 0x06009D02 RID: 40194 RVA: 0x0020E2DC File Offset: 0x0020C4DC
[Token(Token = "0x6009D02")]
[Address(RVA = "0x1B17480", Offset = "0x1B16280", VA = "0x181B17480")]
public static KeyParameter CreateKeyParameter(DerObjectIdentifier algOid, byte[] keyBytes, int offset, int length)
{
return ParameterUtilities.CreateKeyParameter(algOid.identifier, keyBytes, offset, length);
}
// Token: 0x06009D03 RID: 40195 RVA: 0x0020E300 File Offset: 0x0020C500
[Token(Token = "0x6009D03")]
[Address(RVA = "0x1B175A0", Offset = "0x1B163A0", VA = "0x181B175A0")]
public static KeyParameter CreateKeyParameter(string algorithm, byte[] keyBytes, int offset, int length)
{
/*
An exception occurred when decompiling this method (06009D03)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters.KeyParameter BestHTTP.SecureProtocol.Org.BouncyCastle.Security.ParameterUtilities::CreateKeyParameter(System.String,System.Byte[],System.Int32,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_51:
stloc:SecurityUtilityException(var_9_66, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("Algorithm "), ldloc:string(algorithm), ldstr:string(" not recognised."))))
}
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: 0x06009D04 RID: 40196 RVA: 0x0020E374 File Offset: 0x0020C574
[Token(Token = "0x6009D04")]
[Address(RVA = "0x1B181B0", Offset = "0x1B16FB0", VA = "0x181B181B0")]
public static ICipherParameters GetCipherParameters(DerObjectIdentifier algOid, ICipherParameters key, Asn1Object asn1Params)
{
return ParameterUtilities.GetCipherParameters(algOid.identifier, key, asn1Params);
}
// Token: 0x06009D05 RID: 40197 RVA: 0x0020E394 File Offset: 0x0020C594
[Token(Token = "0x6009D05")]
[Address(RVA = "0x1B17E60", Offset = "0x1B16C60", VA = "0x181B17E60")]
public static ICipherParameters GetCipherParameters(string algorithm, ICipherParameters key, Asn1Object asn1Params)
{
/*
An exception occurred when decompiling this method (06009D05)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters BestHTTP.SecureProtocol.Org.BouncyCastle.Security.ParameterUtilities::GetCipherParameters(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters,BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_A9:
stloc:SecurityUtilityException(var_12_BE, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("Algorithm "), ldloc:string(algorithm), ldstr:string(" not recognised."))))
}
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.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: 0x06009D06 RID: 40198 RVA: 0x0020E460 File Offset: 0x0020C660
[Token(Token = "0x6009D06")]
[Address(RVA = "0x1B17D10", Offset = "0x1B16B10", VA = "0x181B17D10")]
public static Asn1Encodable GenerateParameters(DerObjectIdentifier algID, SecureRandom random)
{
return ParameterUtilities.GenerateParameters(algID.identifier, random);
}
// Token: 0x06009D07 RID: 40199 RVA: 0x0020E480 File Offset: 0x0020C680
[Token(Token = "0x6009D07")]
[Address(RVA = "0x1B17970", Offset = "0x1B16770", VA = "0x181B17970")]
public static Asn1Encodable GenerateParameters(string algorithm, SecureRandom random)
{
/*
An exception occurred when decompiling this method (06009D07)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Encodable BestHTTP.SecureProtocol.Org.BouncyCastle.Security.ParameterUtilities::GenerateParameters(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SecureRandom)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_99:
stloc:SecurityUtilityException(var_9_AE, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("Algorithm "), ldloc:string(algorithm), ldstr:string(" not recognised."))))
}
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.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.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.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.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.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: 0x06009D08 RID: 40200 RVA: 0x0020E53C File Offset: 0x0020C73C
[Token(Token = "0x6009D08")]
[Address(RVA = "0x1B18230", Offset = "0x1B17030", VA = "0x181B18230")]
public static ICipherParameters WithRandom(ICipherParameters cp, SecureRandom random)
{
if (random != 0)
{
ParametersWithRandom parametersWithRandom = new ParametersWithRandom(cp, random);
}
return cp;
}
// Token: 0x06009D09 RID: 40201 RVA: 0x0020E558 File Offset: 0x0020C758
[Token(Token = "0x6009D09")]
[Address(RVA = "0x1B17340", Offset = "0x1B16140", VA = "0x181B17340")]
private static Asn1OctetString CreateIVOctetString(SecureRandom random, int ivLength)
{
byte[] array = new byte[ivLength];
double num = random.NextDouble();
DerOctetString derOctetString = new DerOctetString(array);
throw new NullReferenceException();
}
// Token: 0x06009D0A RID: 40202 RVA: 0x0020E580 File Offset: 0x0020C780
[Token(Token = "0x6009D0A")]
[Address(RVA = "0x1B17410", Offset = "0x1B16210", VA = "0x181B17410")]
private static byte[] CreateIV(SecureRandom random, int ivLength)
{
byte[] array = new byte[ivLength];
double num = random.NextDouble();
return array;
}
// Token: 0x06009D0B RID: 40203 RVA: 0x0020E5A4 File Offset: 0x0020C7A4
[Token(Token = "0x6009D0B")]
[Address(RVA = "0x1B17860", Offset = "0x1B16660", VA = "0x181B17860")]
private static int FindBasicIVSize(string canonicalName)
{
IDictionary dictionary = ParameterUtilities.basicIVSizes;
IDictionary dictionary2 = ParameterUtilities.basicIVSizes;
IDictionary dictionary3 = ParameterUtilities.algorithms;
return -1;
}
// Token: 0x040069E1 RID: 27105
[Token(Token = "0x40069E1")]
private static readonly IDictionary algorithms;
// Token: 0x040069E2 RID: 27106
[Token(Token = "0x40069E2")]
private static readonly IDictionary basicIVSizes;
}
}
@@ -0,0 +1,28 @@
using System;
using System.IO;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x0200199F RID: 6559
[Token(Token = "0x200199F")]
[Serializable]
public class PasswordException : IOException
{
// Token: 0x06009C9D RID: 40093 RVA: 0x0020A9F4 File Offset: 0x00208BF4
[Token(Token = "0x6009C9D")]
[Address(RVA = "0x424140", Offset = "0x422F40", VA = "0x180424140")]
public PasswordException(string message)
: base(message)
{
}
// Token: 0x06009C9E RID: 40094 RVA: 0x0020AA08 File Offset: 0x00208C08
[Token(Token = "0x6009C9E")]
[Address(RVA = "0x18E71C0", Offset = "0x18E5FC0", VA = "0x1818E71C0")]
public PasswordException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,742 @@
using System;
using System.Collections;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B0 RID: 6576
[Token(Token = "0x20019B0")]
public sealed class PbeUtilities
{
// Token: 0x06009D0C RID: 40204 RVA: 0x0020E5CC File Offset: 0x0020C7CC
[Token(Token = "0x6009D0C")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private PbeUtilities()
{
}
// Token: 0x06009D0D RID: 40205 RVA: 0x0020E5E0 File Offset: 0x0020C7E0
[Token(Token = "0x6009D0D")]
[Address(RVA = "0x1B1C840", Offset = "0x1B1B640", VA = "0x181B1C840")]
static PbeUtilities()
{
/*
An exception occurred when decompiling this method (06009D0D)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Security.PbeUtilities::.cctor()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:IDictionary(var_1_07, call:IDictionary(Platform::CreateHashtable))
stsfld:IDictionary(PbeUtilities::algorithms, ldloc:IDictionary(var_1_07))
stloc:IDictionary(var_3_15, call:IDictionary(Platform::CreateHashtable))
stsfld:IDictionary(PbeUtilities::algorithmType, ldloc:IDictionary(var_3_15))
stsfld:IDictionary(PbeUtilities::oids, call:IDictionary(Platform::CreateHashtable))
stloc:IDictionary(var_5_2E, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_7_35, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_9_3C, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_10_43, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::IdPbeS2))
stloc:IDictionary(var_12_4A, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_14_51, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_15_58, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithMD2AndDesCbc))
stloc:IDictionary(var_17_5F, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_19_66, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_20_6D, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithMD2AndRC2Cbc))
stloc:IDictionary(var_22_74, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_24_7B, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_25_82, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithMD5AndDesCbc))
stloc:IDictionary(var_27_89, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_29_90, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_30_97, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithMD5AndRC2Cbc))
stloc:IDictionary(var_32_9E, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_34_A5, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_36_AC, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_38_B3, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_40_BA, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_41_C1, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithSha1AndDesCbc))
stloc:IDictionary(var_43_C8, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_45_CF, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_47_D6, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_49_DD, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_51_E4, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_52_EB, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithSha1AndRC2Cbc))
stloc:IDictionary(var_54_F2, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_56_F9, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_57_100, ldsfld:DerObjectIdentifier(BCObjectIdentifiers::bc_pbe_sha1_pkcs12_aes128_cbc))
stloc:IDictionary(var_59_107, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_60_10E, ldsfld:DerObjectIdentifier(BCObjectIdentifiers::bc_pbe_sha1_pkcs12_aes192_cbc))
stloc:IDictionary(var_62_115, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_63_11C, ldsfld:DerObjectIdentifier(BCObjectIdentifiers::bc_pbe_sha1_pkcs12_aes256_cbc))
stloc:IDictionary(var_65_123, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_66_12A, ldsfld:DerObjectIdentifier(BCObjectIdentifiers::bc_pbe_sha256_pkcs12_aes128_cbc))
stloc:IDictionary(var_68_131, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_69_138, ldsfld:DerObjectIdentifier(BCObjectIdentifiers::bc_pbe_sha256_pkcs12_aes192_cbc))
stloc:IDictionary(var_71_13F, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_72_146, ldsfld:DerObjectIdentifier(BCObjectIdentifiers::bc_pbe_sha256_pkcs12_aes256_cbc))
stloc:IDictionary(var_74_14D, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_76_154, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_78_15B, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_80_162, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_81_169, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd128BitRC4))
stloc:IDictionary(var_83_170, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_85_177, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_87_17E, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_89_185, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_90_18C, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd40BitRC4))
stloc:IDictionary(var_92_193, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_94_19A, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_96_1A1, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_98_1A8, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_100_1AF, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_102_1B6, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_104_1BD, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_105_1C4, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd3KeyTripleDesCbc))
stloc:IDictionary(var_107_1CB, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_109_1D2, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_111_1D9, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_113_1E0, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_115_1E7, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_117_1EE, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_119_1F5, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_120_1FC, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd2KeyTripleDesCbc))
stloc:IDictionary(var_122_203, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_124_20A, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_126_211, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_128_218, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_129_21F, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbeWithShaAnd128BitRC2Cbc))
stloc:IDictionary(var_131_226, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_133_22D, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_135_234, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_137_23B, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:DerObjectIdentifier(var_138_242, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::PbewithShaAnd40BitRC2Cbc))
stloc:IDictionary(var_140_249, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_142_250, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_144_257, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_146_25E, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_148_265, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_150_26C, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_152_273, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_154_27A, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_156_281, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_158_288, ldsfld:IDictionary(PbeUtilities::algorithms))
stloc:IDictionary(var_160_28F, ldsfld:IDictionary(PbeUtilities::algorithms))
}
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: 0x06009D0E RID: 40206 RVA: 0x0020E880 File Offset: 0x0020CA80
[Token(Token = "0x6009D0E")]
[Address(RVA = "0x1B1C690", Offset = "0x1B1B490", VA = "0x181B1C690")]
private static PbeParametersGenerator MakePbeGenerator(string type, IDigest digest, byte[] key, byte[] salt, int iterationCount)
{
/*
An exception occurred when decompiling this method (06009D0E)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.PbeParametersGenerator BestHTTP.SecureProtocol.Org.BouncyCastle.Security.PbeUtilities::MakePbeGenerator(System.String,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IDigest,System.Byte[],System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_5D:
stloc:ArgumentException(var_5_69, newobj:ArgumentException(ArgumentException::.ctor, ldloc:string(var_4), ldstr:string("type")))
}
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.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.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.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: 0x06009D0F RID: 40207 RVA: 0x0020E8F8 File Offset: 0x0020CAF8
[Token(Token = "0x6009D0F")]
[Address(RVA = "0x1B1BE90", Offset = "0x1B1AC90", VA = "0x181B1BE90")]
public static DerObjectIdentifier GetObjectIdentifier(string mechanism)
{
string text;
do
{
IDictionary dictionary = PbeUtilities.algorithms;
text = Platform.ToUpperInvariant(mechanism);
if (text == 0)
{
goto IL_2A;
}
}
while (text == 0);
IDictionary dictionary2 = PbeUtilities.oids;
IDictionary dictionary3 = PbeUtilities.algorithms;
IL_2A:
throw new NullReferenceException();
}
// Token: 0x17001906 RID: 6406
// (get) Token: 0x06009D10 RID: 40208 RVA: 0x0020E938 File Offset: 0x0020CB38
[Token(Token = "0x17001906")]
public static ICollection Algorithms
{
[Token(Token = "0x6009D10")]
[Address(RVA = "0x1B1F110", Offset = "0x1B1DF10", VA = "0x181B1F110")]
get
{
IDictionary dictionary = PbeUtilities.oids;
throw new NullReferenceException();
}
}
// Token: 0x06009D11 RID: 40209 RVA: 0x0020E950 File Offset: 0x0020CB50
[Token(Token = "0x6009D11")]
[Address(RVA = "0x1B1C2A0", Offset = "0x1B1B0A0", VA = "0x181B1C2A0")]
public static bool IsPkcs12(string algorithm)
{
string text;
do
{
IDictionary dictionary = PbeUtilities.algorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
goto IL_1B;
}
}
while (text == 0);
IDictionary dictionary2 = PbeUtilities.algorithmType;
IL_1B:
throw new NullReferenceException();
}
// Token: 0x06009D12 RID: 40210 RVA: 0x0020E980 File Offset: 0x0020CB80
[Token(Token = "0x6009D12")]
[Address(RVA = "0x1B1C3F0", Offset = "0x1B1B1F0", VA = "0x181B1C3F0")]
public static bool IsPkcs5Scheme1(string algorithm)
{
string text;
do
{
IDictionary dictionary = PbeUtilities.algorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
goto IL_1B;
}
}
while (text == 0);
IDictionary dictionary2 = PbeUtilities.algorithmType;
IL_1B:
throw new NullReferenceException();
}
// Token: 0x06009D13 RID: 40211 RVA: 0x0020E9B0 File Offset: 0x0020CBB0
[Token(Token = "0x6009D13")]
[Address(RVA = "0x1B1C540", Offset = "0x1B1B340", VA = "0x181B1C540")]
public static bool IsPkcs5Scheme2(string algorithm)
{
string text;
do
{
IDictionary dictionary = PbeUtilities.algorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
goto IL_1B;
}
}
while (text == 0);
IDictionary dictionary2 = PbeUtilities.algorithmType;
IL_1B:
throw new NullReferenceException();
}
// Token: 0x06009D14 RID: 40212 RVA: 0x0020E9E0 File Offset: 0x0020CBE0
[Token(Token = "0x6009D14")]
[Address(RVA = "0x1B1C020", Offset = "0x1B1AE20", VA = "0x181B1C020")]
public static bool IsOpenSsl(string algorithm)
{
string text;
do
{
IDictionary dictionary = PbeUtilities.algorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
goto IL_1B;
}
}
while (text == 0);
IDictionary dictionary2 = PbeUtilities.algorithmType;
IL_1B:
throw new NullReferenceException();
}
// Token: 0x06009D15 RID: 40213 RVA: 0x0020EA10 File Offset: 0x0020CC10
[Token(Token = "0x6009D15")]
[Address(RVA = "0x1B1C170", Offset = "0x1B1AF70", VA = "0x181B1C170")]
public static bool IsPbeAlgorithm(string algorithm)
{
string text;
do
{
IDictionary dictionary = PbeUtilities.algorithms;
text = Platform.ToUpperInvariant(algorithm);
if (text == 0)
{
goto IL_1D;
}
}
while (text == 0);
IDictionary dictionary2 = PbeUtilities.algorithmType;
bool flag;
return flag;
IL_1D:
throw new NullReferenceException();
}
// Token: 0x06009D16 RID: 40214 RVA: 0x0020EA44 File Offset: 0x0020CC44
[Token(Token = "0x6009D16")]
[Address(RVA = "0x1B1A990", Offset = "0x1B19790", VA = "0x181B1A990")]
public static Asn1Encodable GenerateAlgorithmParameters(DerObjectIdentifier algorithmOid, byte[] salt, int iterationCount)
{
string identifier = algorithmOid.identifier;
if (!PbeUtilities.IsPkcs12(identifier))
{
if (!PbeUtilities.IsPkcs5Scheme2(identifier))
{
PbeParameter pbeParameter = new PbeParameter(salt, iterationCount);
}
Pbkdf2Params pbkdf2Params = new Pbkdf2Params(salt, iterationCount);
}
Pkcs12PbeParams pkcs12PbeParams = new Pkcs12PbeParams(salt, iterationCount);
throw new NullReferenceException();
}
// Token: 0x06009D17 RID: 40215 RVA: 0x0020EA88 File Offset: 0x0020CC88
[Token(Token = "0x6009D17")]
[Address(RVA = "0x1B1AB10", Offset = "0x1B19910", VA = "0x181B1AB10")]
public static Asn1Encodable GenerateAlgorithmParameters(string algorithm, byte[] salt, int iterationCount)
{
/*
An exception occurred when decompiling this method (06009D17)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Encodable BestHTTP.SecureProtocol.Org.BouncyCastle.Security.PbeUtilities::GenerateAlgorithmParameters(System.String,System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_22:
stloc:Pkcs12PbeParams(var_2_29, newobj:Pkcs12PbeParams(Pkcs12PbeParams::.ctor, ldloc:uint8[](salt), ldloc:int32(iterationCount)))
}
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: 0x06009D18 RID: 40216 RVA: 0x0020EAC0 File Offset: 0x0020CCC0
[Token(Token = "0x6009D18")]
[Address(RVA = "0x1B1AEF0", Offset = "0x1B19CF0", VA = "0x181B1AEF0")]
public static ICipherParameters GenerateCipherParameters(DerObjectIdentifier algorithmOid, char[] password, Asn1Encodable pbeParameters)
{
string identifier = algorithmOid.identifier;
int num = 0;
return PbeUtilities.GenerateCipherParameters(identifier, password, num != 0, pbeParameters);
}
// Token: 0x06009D19 RID: 40217 RVA: 0x0020EAE8 File Offset: 0x0020CCE8
[Token(Token = "0x6009D19")]
[Address(RVA = "0x1B1AC40", Offset = "0x1B19A40", VA = "0x181B1AC40")]
public static ICipherParameters GenerateCipherParameters(DerObjectIdentifier algorithmOid, char[] password, bool wrongPkcs12Zero, Asn1Encodable pbeParameters)
{
return PbeUtilities.GenerateCipherParameters(algorithmOid.identifier, password, wrongPkcs12Zero, pbeParameters);
}
// Token: 0x06009D1A RID: 40218 RVA: 0x0020EB0C File Offset: 0x0020CD0C
[Token(Token = "0x6009D1A")]
[Address(RVA = "0x1B1ACE0", Offset = "0x1B19AE0", VA = "0x181B1ACE0")]
public static ICipherParameters GenerateCipherParameters(AlgorithmIdentifier algID, char[] password)
{
Asn1Object asn1Object = algID.ToAsn1Object();
DerObjectIdentifier objectID = algID.ObjectID;
ICipherParameters cipherParameters;
return cipherParameters;
}
// Token: 0x06009D1B RID: 40219 RVA: 0x0020EB30 File Offset: 0x0020CD30
[Token(Token = "0x6009D1B")]
[Address(RVA = "0x1B1AE20", Offset = "0x1B19C20", VA = "0x181B1AE20")]
public static ICipherParameters GenerateCipherParameters(AlgorithmIdentifier algID, char[] password, bool wrongPkcs12Zero)
{
Asn1Object asn1Object = algID.ToAsn1Object();
DerObjectIdentifier objectID = algID.ObjectID;
ICipherParameters cipherParameters;
return cipherParameters;
}
// Token: 0x06009D1C RID: 40220 RVA: 0x0020EB54 File Offset: 0x0020CD54
[Token(Token = "0x6009D1C")]
[Address(RVA = "0x1B1ADA0", Offset = "0x1B19BA0", VA = "0x181B1ADA0")]
public static ICipherParameters GenerateCipherParameters(string algorithm, char[] password, Asn1Encodable pbeParameters)
{
int num = 0;
return PbeUtilities.GenerateCipherParameters(algorithm, password, num != 0, pbeParameters);
}
// Token: 0x06009D1D RID: 40221 RVA: 0x0020EB6C File Offset: 0x0020CD6C
[Token(Token = "0x6009D1D")]
[Address(RVA = "0x1B1AF80", Offset = "0x1B19D80", VA = "0x181B1AF80")]
public static ICipherParameters GenerateCipherParameters(string algorithm, char[] password, bool wrongPkcs12Zero, Asn1Encodable pbeParameters)
{
int num;
for (;;)
{
IDictionary dictionary = PbeUtilities.algorithms;
string text = Platform.ToUpperInvariant(algorithm);
num = 0;
if (text == 0 || text != 0)
{
if (PbeUtilities.IsPkcs12(num))
{
goto IL_4D;
}
int num2;
if (!PbeUtilities.IsPkcs5Scheme2(num))
{
PbeParameter instance = PbeParameter.GetInstance(pbeParameters);
byte[] salt = instance.GetSalt();
num2 = instance.IterationCount.IntValue;
byte[] array = PbeParametersGenerator.Pkcs5PasswordToBytes(password);
goto IL_4D;
}
IL_6C:
if (PbeUtilities.IsPkcs5Scheme2(num))
{
goto IL_1D3;
}
if (Platform.StartsWith(num, "PBEwithSHA-1"))
{
goto IL_14E;
}
if (Platform.StartsWith(num, "PBEwithSHA-256"))
{
goto IL_128;
}
if (Platform.StartsWith(num, "PBEwithMD5"))
{
goto IL_FA;
}
if (Platform.StartsWith(num, "PBEwithMD2"))
{
break;
}
if (!Platform.StartsWith(num, "PBEwithHmac"))
{
goto IL_29A;
}
string text2;
IDigest digest = DigestUtilities.GetDigest(text2);
IDictionary dictionary2 = PbeUtilities.algorithmType;
if (digest == 0 || digest != 0)
{
break;
}
continue;
IL_4D:
Pkcs12PbeParams instance2 = Pkcs12PbeParams.GetInstance(pbeParameters);
byte[] iv = instance2.GetIV();
num2 = instance2.Iterations.IntValue;
goto IL_6C;
}
}
IDictionary dictionary3 = PbeUtilities.algorithmType;
MD2Digest md2Digest = new MD2Digest();
bool flag;
if (flag)
{
goto IL_19A;
}
IL_FA:
IDictionary dictionary4 = PbeUtilities.algorithmType;
MD5Digest md5Digest = new MD5Digest();
bool flag2;
bool flag3;
if (flag2 || flag3)
{
goto IL_19A;
}
bool flag4;
if (flag4)
{
goto IL_1C0;
}
bool flag5;
if (flag5)
{
goto IL_1AD;
}
IL_128:
IDictionary dictionary5 = PbeUtilities.algorithmType;
Sha256Digest sha256Digest = new Sha256Digest();
bool flag6;
if (flag6)
{
goto IL_1C0;
}
bool flag7;
if (flag7)
{
goto IL_1AD;
}
bool flag8;
if (!flag8)
{
goto IL_29A;
}
IL_14E:
IDictionary dictionary6 = PbeUtilities.algorithmType;
Sha1Digest sha1Digest = new Sha1Digest();
bool flag9;
if (flag9)
{
goto IL_1C0;
}
bool flag10;
if (flag10)
{
goto IL_1AD;
}
bool flag11;
while (flag11)
{
}
bool flag12;
bool flag13;
if (flag12 || flag13)
{
goto IL_1AD;
}
bool flag14;
bool flag15;
bool flag16;
bool flag17;
bool flag18;
bool flag19;
if (!flag14 && !flag15 && !flag16 && !flag17 && !flag18 && !flag19)
{
goto IL_29A;
}
IL_19A:
PbeParametersGenerator pbeParametersGenerator;
ICipherParameters cipherParameters = pbeParametersGenerator.GenerateDerivedParameters("DESEDE", 192);
IL_1AD:
ICipherParameters cipherParameters2 = pbeParametersGenerator.GenerateDerivedParameters("AES", 128);
IL_1C0:
ICipherParameters cipherParameters3 = pbeParametersGenerator.GenerateDerivedParameters("AES", 128);
IL_1D3:
PbeS2Parameters pbeS2Parameters;
EncryptionScheme scheme = pbeS2Parameters.scheme;
Asn1Object asn1Object = scheme.ToAsn1Object();
Asn1Object asn1Object2 = scheme.ObjectID.ToAsn1Object();
Pbkdf2Params instance3 = Pbkdf2Params.GetInstance(pbeS2Parameters.func.ObjectID.ToAsn1Object());
Asn1OctetString instance4 = Asn1OctetString.GetInstance(asn1Object2);
Stream octetStream = instance4.GetOctetStream();
byte[] iv2 = RC2CbcParameter.GetInstance(instance4).GetIV();
byte[] salt2 = instance3.GetSalt();
int intValue = instance3.IterationCount.IntValue;
byte[] array2 = PbeParametersGenerator.Pkcs5PasswordToBytes(password);
if (instance3.KeyLength != 0)
{
int intValue2 = instance3.KeyLength.IntValue;
}
IDictionary dictionary7 = PbeUtilities.algorithmType;
ParametersWithIV parametersWithIV;
if (iv2 != 0)
{
byte[] array3 = new byte[iv2.Length];
if (!Arrays.AreEqual(iv2, array3))
{
ICipherParameters cipherParameters4;
parametersWithIV = new ParametersWithIV(cipherParameters4, iv2);
}
}
IL_29A:
int length = array2.Length;
int num3 = 0;
Array.Clear(array2, num3, length);
return PbeUtilities.FixDesParity(num, parametersWithIV);
}
// Token: 0x06009D1E RID: 40222 RVA: 0x0020EE38 File Offset: 0x0020D038
[Token(Token = "0x6009D1E")]
[Address(RVA = "0x1B1A560", Offset = "0x1B19360", VA = "0x181B1A560")]
public static object CreateEngine(DerObjectIdentifier algorithmOid)
{
return PbeUtilities.CreateEngine(algorithmOid.identifier);
}
// Token: 0x06009D1F RID: 40223 RVA: 0x0020EE58 File Offset: 0x0020D058
[Token(Token = "0x6009D1F")]
[Address(RVA = "0x1B1A5C0", Offset = "0x1B193C0", VA = "0x181B1A5C0")]
public static object CreateEngine(AlgorithmIdentifier algID)
{
Asn1Object asn1Object = algID.ToAsn1Object();
bool flag;
if (!flag)
{
object obj;
return obj;
}
Asn1Object asn1Object2 = PbeS2Parameters.GetInstance(algID.ObjectID.ToAsn1Object()).scheme.ToAsn1Object();
throw new NullReferenceException();
}
// Token: 0x06009D20 RID: 40224 RVA: 0x0020EE94 File Offset: 0x0020D094
[Token(Token = "0x6009D20")]
[Address(RVA = "0x1B1A0D0", Offset = "0x1B18ED0", VA = "0x181B1A0D0")]
public static object CreateEngine(string algorithm)
{
string text;
int num;
do
{
IDictionary dictionary = PbeUtilities.algorithms;
text = Platform.ToUpperInvariant(algorithm);
num = 0;
}
while (text != 0 && text == 0);
if (!Platform.StartsWith(num, "PBEwithHmac"))
{
if (Platform.StartsWith(num, "PBEwithMD2") || Platform.StartsWith(num, "PBEwithMD5") || Platform.StartsWith(num, "PBEwithSHA-1") || Platform.StartsWith(num, "PBEwithSHA-256"))
{
if (Platform.EndsWith(num, "AES-CBC-BC") || Platform.EndsWith(num, "AES-CBC-OPENSSL"))
{
goto IL_E9;
}
if (Platform.EndsWith(num, "DES-CBC"))
{
goto IL_DD;
}
if (Platform.EndsWith(num, "DESEDE-CBC"))
{
goto IL_D1;
}
if (Platform.EndsWith(num, "RC2-CBC"))
{
goto IL_C5;
}
if (!Platform.EndsWith(num, "RC4"))
{
}
}
IBufferedCipher cipher = CipherUtilities.GetCipher("RC4");
IL_C5:
IBufferedCipher cipher2 = CipherUtilities.GetCipher("RC2/CBC");
IL_D1:
IBufferedCipher cipher3 = CipherUtilities.GetCipher("DESEDE/CBC");
IL_DD:
IBufferedCipher cipher4 = CipherUtilities.GetCipher("DES/CBC");
IL_E9:
IBufferedCipher cipher5 = CipherUtilities.GetCipher("AES/CBC");
}
string text2;
IMac mac = MacUtilities.GetMac("HMAC/" + text2);
throw new NullReferenceException();
}
// Token: 0x06009D21 RID: 40225 RVA: 0x0020EFB4 File Offset: 0x0020D1B4
[Token(Token = "0x6009D21")]
[Address(RVA = "0x1B1BDE0", Offset = "0x1B1ABE0", VA = "0x181B1BDE0")]
public static string GetEncodingName(DerObjectIdentifier oid)
{
IDictionary dictionary = PbeUtilities.algorithms;
throw new NullReferenceException();
}
// Token: 0x06009D22 RID: 40226 RVA: 0x0020EFCC File Offset: 0x0020D1CC
[Token(Token = "0x6009D22")]
[Address(RVA = "0x1B1A700", Offset = "0x1B19500", VA = "0x181B1A700")]
private static ICipherParameters FixDesParity(string mechanism, ICipherParameters parameters)
{
while (Platform.EndsWith(mechanism, "DES-CBC") || Platform.EndsWith(mechanism, "DESEDE-CBC"))
{
byte[] array;
if (parameters == 0)
{
if (parameters == 0 || parameters == 0)
{
continue;
}
DesParameters.SetOddParity(array);
KeyParameter keyParameter = new KeyParameter(array);
}
byte b = array[33];
ICipherParameters cipherParameters;
byte[] array2;
ParametersWithIV parametersWithIV = new ParametersWithIV(cipherParameters, array2);
throw new NullReferenceException();
}
return parameters;
}
// Token: 0x040069E3 RID: 27107
[Token(Token = "0x40069E3")]
private const string Pkcs5S1 = "Pkcs5S1";
// Token: 0x040069E4 RID: 27108
[Token(Token = "0x40069E4")]
private const string Pkcs5S2 = "Pkcs5S2";
// Token: 0x040069E5 RID: 27109
[Token(Token = "0x40069E5")]
private const string Pkcs12 = "Pkcs12";
// Token: 0x040069E6 RID: 27110
[Token(Token = "0x40069E6")]
private const string OpenSsl = "OpenSsl";
// Token: 0x040069E7 RID: 27111
[Token(Token = "0x40069E7")]
private static readonly IDictionary algorithms;
// Token: 0x040069E8 RID: 27112
[Token(Token = "0x40069E8")]
private static readonly IDictionary algorithmType;
// Token: 0x040069E9 RID: 27113
[Token(Token = "0x40069E9")]
private static readonly IDictionary oids;
}
}
@@ -0,0 +1,146 @@
using System;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Pkcs;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B1 RID: 6577
[Token(Token = "0x20019B1")]
public sealed class PrivateKeyFactory
{
// Token: 0x06009D23 RID: 40227 RVA: 0x0020F038 File Offset: 0x0020D238
[Token(Token = "0x6009D23")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private PrivateKeyFactory()
{
}
// Token: 0x06009D24 RID: 40228 RVA: 0x0020F04C File Offset: 0x0020D24C
[Token(Token = "0x6009D24")]
[Address(RVA = "0x1B20110", Offset = "0x1B1EF10", VA = "0x181B20110")]
public static AsymmetricKeyParameter CreateKey(byte[] privateKeyInfoData)
{
return PrivateKeyFactory.CreateKey(PrivateKeyInfo.GetInstance(Asn1Object.FromByteArray(privateKeyInfoData)));
}
// Token: 0x06009D25 RID: 40229 RVA: 0x0020F06C File Offset: 0x0020D26C
[Token(Token = "0x6009D25")]
[Address(RVA = "0x1B20140", Offset = "0x1B1EF40", VA = "0x181B20140")]
public static AsymmetricKeyParameter CreateKey(Stream inStr)
{
return PrivateKeyFactory.CreateKey(PrivateKeyInfo.GetInstance(Asn1Object.FromStream(inStr)));
}
// Token: 0x06009D26 RID: 40230 RVA: 0x0020F08C File Offset: 0x0020D28C
[Token(Token = "0x6009D26")]
[Address(RVA = "0x1B1F190", Offset = "0x1B1DF90", VA = "0x181B1F190")]
public static AsymmetricKeyParameter CreateKey(PrivateKeyInfo keyInfo)
{
/*
An exception occurred when decompiling this method (06009D26)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.AsymmetricKeyParameter BestHTTP.SecureProtocol.Org.BouncyCastle.Security.PrivateKeyFactory::CreateKey(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs.PrivateKeyInfo)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2D9:
stloc:ArgumentException(var_91_2E3, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Unrecognized curve OID for GostR3410x2001 private key")))
}
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: 0x06009D27 RID: 40231 RVA: 0x0020F380 File Offset: 0x0020D580
[Token(Token = "0x6009D27")]
[Address(RVA = "0x1B202D0", Offset = "0x1B1F0D0", VA = "0x181B202D0")]
private static byte[] GetRawKey(PrivateKeyInfo keyInfo, int expectedSize)
{
/*
An exception occurred when decompiling this method (06009D27)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Security.PrivateKeyFactory::GetRawKey(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs.PrivateKeyInfo,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_1A:
stloc:SecurityUtilityException(var_1_24, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldstr:string("private key encoding has incorrect length")))
}
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: 0x06009D28 RID: 40232 RVA: 0x0020F3B4 File Offset: 0x0020D5B4
[Token(Token = "0x6009D28")]
[Address(RVA = "0x1B201F0", Offset = "0x1B1EFF0", VA = "0x181B201F0")]
public static AsymmetricKeyParameter DecryptKey(char[] passPhrase, EncryptedPrivateKeyInfo encInfo)
{
return PrivateKeyFactory.CreateKey(PrivateKeyInfoFactory.CreatePrivateKeyInfo(passPhrase, encInfo));
}
// Token: 0x06009D29 RID: 40233 RVA: 0x0020F3D0 File Offset: 0x0020D5D0
[Token(Token = "0x6009D29")]
[Address(RVA = "0x1B20170", Offset = "0x1B1EF70", VA = "0x181B20170")]
public static AsymmetricKeyParameter DecryptKey(char[] passPhrase, byte[] encryptedPrivateKeyInfoData)
{
EncryptedPrivateKeyInfo instance = EncryptedPrivateKeyInfo.GetInstance(Asn1Object.FromByteArray(encryptedPrivateKeyInfoData));
return PrivateKeyFactory.CreateKey(PrivateKeyInfoFactory.CreatePrivateKeyInfo(passPhrase, instance));
}
// Token: 0x06009D2A RID: 40234 RVA: 0x0020F3F8 File Offset: 0x0020D5F8
[Token(Token = "0x6009D2A")]
[Address(RVA = "0x1B20210", Offset = "0x1B1F010", VA = "0x181B20210")]
public static AsymmetricKeyParameter DecryptKey(char[] passPhrase, Stream encryptedPrivateKeyInfoStream)
{
EncryptedPrivateKeyInfo instance = EncryptedPrivateKeyInfo.GetInstance(Asn1Object.FromStream(encryptedPrivateKeyInfoStream));
return PrivateKeyFactory.CreateKey(PrivateKeyInfoFactory.CreatePrivateKeyInfo(passPhrase, instance));
}
// Token: 0x06009D2B RID: 40235 RVA: 0x0020F420 File Offset: 0x0020D620
[Token(Token = "0x6009D2B")]
[Address(RVA = "0x1B201B0", Offset = "0x1B1EFB0", VA = "0x181B201B0")]
private static AsymmetricKeyParameter DecryptKey(char[] passPhrase, Asn1Object asn1Object)
{
EncryptedPrivateKeyInfo instance = EncryptedPrivateKeyInfo.GetInstance(asn1Object);
return PrivateKeyFactory.CreateKey(PrivateKeyInfoFactory.CreatePrivateKeyInfo(passPhrase, instance));
}
// Token: 0x06009D2C RID: 40236 RVA: 0x0020F440 File Offset: 0x0020D640
[Token(Token = "0x6009D2C")]
[Address(RVA = "0x1B20290", Offset = "0x1B1F090", VA = "0x181B20290")]
public static byte[] EncryptKey(DerObjectIdentifier algorithm, char[] passPhrase, byte[] salt, int iterationCount, AsymmetricKeyParameter key)
{
EncryptedPrivateKeyInfo encryptedPrivateKeyInfo;
return encryptedPrivateKeyInfo.GetEncoded();
}
// Token: 0x06009D2D RID: 40237 RVA: 0x0020F45C File Offset: 0x0020D65C
[Token(Token = "0x6009D2D")]
[Address(RVA = "0x1B20250", Offset = "0x1B1F050", VA = "0x181B20250")]
public static byte[] EncryptKey(string algorithm, char[] passPhrase, byte[] salt, int iterationCount, AsymmetricKeyParameter key)
{
EncryptedPrivateKeyInfo encryptedPrivateKeyInfo;
return encryptedPrivateKeyInfo.GetEncoded();
}
}
}
@@ -0,0 +1,113 @@
using System;
using System.IO;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B2 RID: 6578
[Token(Token = "0x20019B2")]
public sealed class PublicKeyFactory
{
// Token: 0x06009D2E RID: 40238 RVA: 0x0020F478 File Offset: 0x0020D678
[Token(Token = "0x6009D2E")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private PublicKeyFactory()
{
}
// Token: 0x06009D2F RID: 40239 RVA: 0x0020F48C File Offset: 0x0020D68C
[Token(Token = "0x6009D2F")]
[Address(RVA = "0x1B21830", Offset = "0x1B20630", VA = "0x181B21830")]
public static AsymmetricKeyParameter CreateKey(byte[] keyInfoData)
{
return PublicKeyFactory.CreateKey(SubjectPublicKeyInfo.GetInstance(Asn1Object.FromByteArray(keyInfoData)));
}
// Token: 0x06009D30 RID: 40240 RVA: 0x0020F4AC File Offset: 0x0020D6AC
[Token(Token = "0x6009D30")]
[Address(RVA = "0x1B20390", Offset = "0x1B1F190", VA = "0x181B20390")]
public static AsymmetricKeyParameter CreateKey(Stream inStr)
{
return PublicKeyFactory.CreateKey(SubjectPublicKeyInfo.GetInstance(Asn1Object.FromStream(inStr)));
}
// Token: 0x06009D31 RID: 40241 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6009D31")]
[Address(RVA = "0x1B203C0", Offset = "0x1B1F1C0", VA = "0x181B203C0")]
public static AsymmetricKeyParameter CreateKey(SubjectPublicKeyInfo keyInfo)
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06009D32 RID: 40242 RVA: 0x0020F4CC File Offset: 0x0020D6CC
[Token(Token = "0x6009D32")]
[Address(RVA = "0x1B21860", Offset = "0x1B20660", VA = "0x181B21860")]
private static byte[] GetRawKey(SubjectPublicKeyInfo keyInfo, int expectedSize)
{
/*
An exception occurred when decompiling this method (06009D32)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Security.PublicKeyFactory::GetRawKey(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509.SubjectPublicKeyInfo,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:string(var_0_0B, callvirt:string(DerBitString::GetString, ldfld:DerBitString(SubjectPublicKeyInfo::keyData, ldloc:SubjectPublicKeyInfo(keyInfo))))
stloc:SecurityUtilityException(var_1_16, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldstr:string("public key encoding has incorrect length")))
}
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: 0x06009D33 RID: 40243 RVA: 0x0020F4F0 File Offset: 0x0020D6F0
[Token(Token = "0x6009D33")]
[Address(RVA = "0x1B21900", Offset = "0x1B20700", VA = "0x181B21900")]
private static bool IsPkcsDHParam(Asn1Sequence seq)
{
Asn1Encodable asn1Encodable;
if (asn1Encodable != (ulong)2L)
{
Asn1SequenceParser parser = seq.Parser;
Asn1SequenceParser parser2 = seq.Parser;
DerInteger derInteger;
BigInteger value = derInteger.Value;
DerInteger derInteger2;
BigInteger bigInteger = BigInteger.ValueOf((long)derInteger2.Value.BitLength);
return value.CompareTo(bigInteger) <= 0;
}
return true;
}
// Token: 0x06009D34 RID: 40244 RVA: 0x0020F548 File Offset: 0x0020D748
[Token(Token = "0x6009D34")]
[Address(RVA = "0x1B21A70", Offset = "0x1B20870", VA = "0x181B21A70")]
private static DHPublicKeyParameters ReadPkcsDHParam(DerObjectIdentifier algOid, BigInteger y, Asn1Sequence seq)
{
DHParameter dhparameter = new DHParameter(seq);
BigInteger l = dhparameter.L;
if (l == 0)
{
}
int intValue = l.IntValue;
BigInteger p = dhparameter.P;
BigInteger g = dhparameter.G;
int num;
DHParameters dhparameters = new DHParameters(p, g, num, intValue);
num = 0;
return new DHPublicKeyParameters(y, dhparameters, algOid);
}
}
}
@@ -0,0 +1,310 @@
using System;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Prng;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B3 RID: 6579
[Token(Token = "0x20019B3")]
public class SecureRandom : Random
{
// Token: 0x06009D35 RID: 40245 RVA: 0x0020F59C File Offset: 0x0020D79C
[Token(Token = "0x6009D35")]
[Address(RVA = "0x1B22360", Offset = "0x1B21160", VA = "0x181B22360")]
private static long NextCounterValue()
{
long num;
return num;
}
// Token: 0x17001907 RID: 6407
// (get) Token: 0x06009D36 RID: 40246 RVA: 0x0020F5AC File Offset: 0x0020D7AC
[Token(Token = "0x17001907")]
private static SecureRandom Master
{
[Token(Token = "0x6009D36")]
[Address(RVA = "0x1B22B70", Offset = "0x1B21970", VA = "0x181B22B70")]
get
{
return SecureRandom.master;
}
}
// Token: 0x06009D37 RID: 40247 RVA: 0x0020F5C0 File Offset: 0x0020D7C0
[Token(Token = "0x6009D37")]
[Address(RVA = "0x1B21B90", Offset = "0x1B20990", VA = "0x181B21B90")]
private static DigestRandomGenerator CreatePrng(string digestName, bool autoSeed)
{
IDigest digest = DigestUtilities.GetDigest(digestName);
if (digest != 0)
{
DigestRandomGenerator digestRandomGenerator = new DigestRandomGenerator(digest);
if (autoSeed)
{
long num;
digestRandomGenerator.AddSeedMaterial(num);
byte[] array;
digestRandomGenerator.AddSeedMaterial(array);
}
return digestRandomGenerator;
}
throw new NullReferenceException();
}
// Token: 0x06009D38 RID: 40248 RVA: 0x0020F5F8 File Offset: 0x0020D7F8
[Token(Token = "0x6009D38")]
[Address(RVA = "0x1B22110", Offset = "0x1B20F10", VA = "0x181B22110")]
public static byte[] GetNextBytes(SecureRandom secureRandom, int length)
{
byte[] array = new byte[length];
double num = secureRandom.NextDouble();
return array;
}
// Token: 0x06009D39 RID: 40249 RVA: 0x0020F61C File Offset: 0x0020D81C
[Token(Token = "0x6009D39")]
[Address(RVA = "0x1B21E10", Offset = "0x1B20C10", VA = "0x181B21E10")]
public static SecureRandom GetInstance(string algorithm)
{
/*
An exception occurred when decompiling this method (06009D39)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SecureRandom BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SecureRandom::GetInstance(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_4B:
stloc:ArgumentException(var_7_60, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Unrecognised PRNG algorithm: "), ldloc:string(algorithm)), ldstr:string("algorithm")))
}
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: 0x06009D3A RID: 40250 RVA: 0x0020F68C File Offset: 0x0020D88C
[Token(Token = "0x6009D3A")]
[Address(RVA = "0x1B21FB0", Offset = "0x1B20DB0", VA = "0x181B21FB0")]
public static SecureRandom GetInstance(string algorithm, bool autoSeed)
{
/*
An exception occurred when decompiling this method (06009D3A)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SecureRandom BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SecureRandom::GetInstance(System.String,System.Boolean)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_48:
stloc:ArgumentException(var_6_5D, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Unrecognised PRNG algorithm: "), ldloc:string(algorithm)), ldstr:string("algorithm")))
}
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: 0x06009D3B RID: 40251 RVA: 0x0020F6F8 File Offset: 0x0020D8F8
[Token(Token = "0x6009D3B")]
[Address(RVA = "0x1B22180", Offset = "0x1B20F80", VA = "0x181B22180")]
[Obsolete]
public static byte[] GetSeed(int length)
{
SecureRandom secureRandom = SecureRandom.master;
byte[] array = new byte[length];
double num = secureRandom.NextDouble();
return array;
}
// Token: 0x06009D3C RID: 40252 RVA: 0x0020F720 File Offset: 0x0020D920
[Token(Token = "0x6009D3C")]
[Address(RVA = "0x1B22AF0", Offset = "0x1B218F0", VA = "0x181B22AF0")]
public SecureRandom()
{
DigestRandomGenerator digestRandomGenerator = SecureRandom.CreatePrng("SHA256", true);
int num = 0;
base..ctor(num);
this.generator = digestRandomGenerator;
}
// Token: 0x06009D3D RID: 40253 RVA: 0x0020F74C File Offset: 0x0020D94C
[Token(Token = "0x6009D3D")]
[Address(RVA = "0x1B229E0", Offset = "0x1B217E0", VA = "0x181B229E0")]
[Obsolete]
public SecureRandom(byte[] seed)
{
IDigest digest = DigestUtilities.GetDigest("SHA1");
if (digest != 0)
{
DigestRandomGenerator digestRandomGenerator = new DigestRandomGenerator(digest);
}
int num = 0;
int num2 = 0;
base..ctor(num2);
this.generator = num;
}
// Token: 0x06009D3E RID: 40254 RVA: 0x0020F784 File Offset: 0x0020D984
[Token(Token = "0x6009D3E")]
[Address(RVA = "0x1B229B0", Offset = "0x1B217B0", VA = "0x181B229B0")]
public SecureRandom(IRandomGenerator generator)
{
int num = 0;
base..ctor(num);
this.generator = generator;
}
// Token: 0x06009D3F RID: 40255 RVA: 0x0020F7A4 File Offset: 0x0020D9A4
[Token(Token = "0x6009D3F")]
[Address(RVA = "0x1B21D10", Offset = "0x1B20B10", VA = "0x181B21D10", Slot = "10")]
public virtual byte[] GenerateSeed(int length)
{
SecureRandom secureRandom = SecureRandom.master;
byte[] array = new byte[length];
double num = secureRandom.NextDouble();
return array;
}
// Token: 0x06009D40 RID: 40256 RVA: 0x0020F7CC File Offset: 0x0020D9CC
[Token(Token = "0x6009D40")]
[Address(RVA = "0x1B22850", Offset = "0x1B21650", VA = "0x181B22850", Slot = "11")]
public virtual void SetSeed(byte[] seed)
{
IRandomGenerator randomGenerator = this.generator;
throw new NullReferenceException();
}
// Token: 0x06009D41 RID: 40257 RVA: 0x0020F7E8 File Offset: 0x0020D9E8
[Token(Token = "0x6009D41")]
[Address(RVA = "0x1B22790", Offset = "0x1B21590", VA = "0x181B22790", Slot = "12")]
public virtual void SetSeed(long seed)
{
IRandomGenerator randomGenerator = this.generator;
int num = 0;
num += num;
num++;
randomGenerator.AddSeedMaterial(seed);
}
// Token: 0x06009D42 RID: 40258 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6009D42")]
[Address(RVA = "0x1B22770", Offset = "0x1B21570", VA = "0x181B22770", Slot = "5")]
public override int Next()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06009D43 RID: 40259 RVA: 0x0020F814 File Offset: 0x0020DA14
[Token(Token = "0x6009D43")]
[Address(RVA = "0x1B22680", Offset = "0x1B21480", VA = "0x181B22680", Slot = "7")]
public override int Next(int maxValue)
{
int num = maxValue - 1;
if (maxValue != num)
{
}
return 0;
}
// Token: 0x06009D44 RID: 40260 RVA: 0x0020F83C File Offset: 0x0020DA3C
[Token(Token = "0x6009D44")]
[Address(RVA = "0x1B225A0", Offset = "0x1B213A0", VA = "0x181B225A0", Slot = "6")]
public override int Next(int minValue, int maxValue)
{
if (maxValue > minValue)
{
int num;
num += minValue;
return num;
}
return minValue;
}
// Token: 0x06009D45 RID: 40261 RVA: 0x0020F860 File Offset: 0x0020DA60
[Token(Token = "0x6009D45")]
[Address(RVA = "0x1B22280", Offset = "0x1B21080", VA = "0x181B22280", Slot = "9")]
public override void NextBytes(byte[] buf)
{
IRandomGenerator randomGenerator = this.generator;
throw new NullReferenceException();
}
// Token: 0x06009D46 RID: 40262 RVA: 0x0020F87C File Offset: 0x0020DA7C
[Token(Token = "0x6009D46")]
[Address(RVA = "0x1B222E0", Offset = "0x1B210E0", VA = "0x181B222E0", Slot = "13")]
public virtual void NextBytes(byte[] buf, int off, int len)
{
IRandomGenerator randomGenerator = this.generator;
}
// Token: 0x06009D47 RID: 40263 RVA: 0x0020F898 File Offset: 0x0020DA98
[Token(Token = "0x6009D47")]
[Address(RVA = "0x1B223C0", Offset = "0x1B211C0", VA = "0x181B223C0", Slot = "8")]
public override double NextDouble()
{
return Convert.ToDouble((ulong)this.NextInt());
}
// Token: 0x06009D48 RID: 40264 RVA: 0x0020F8B0 File Offset: 0x0020DAB0
[Token(Token = "0x6009D48")]
[Address(RVA = "0x1B22470", Offset = "0x1B21270", VA = "0x181B22470", Slot = "14")]
public virtual int NextInt()
{
byte[] array = new byte[4];
double num = this.NextDouble();
int length = array.Length;
byte b = array[0];
throw new NullReferenceException();
}
// Token: 0x06009D49 RID: 40265 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6009D49")]
[Address(RVA = "0x1B22550", Offset = "0x1B21350", VA = "0x181B22550", Slot = "15")]
public virtual long NextLong()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06009D4A RID: 40266 RVA: 0x0020F8E0 File Offset: 0x0020DAE0
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009D4A")]
[Address(RVA = "0x1B228B0", Offset = "0x1B216B0", VA = "0x181B228B0")]
static SecureRandom()
{
CryptoApiRandomGenerator cryptoApiRandomGenerator = new CryptoApiRandomGenerator();
int num;
SecureRandom secureRandom = new SecureRandom(num);
num = 0;
secureRandom.generator = cryptoApiRandomGenerator;
SecureRandom.master = secureRandom;
}
// Token: 0x040069EA RID: 27114
[Token(Token = "0x40069EA")]
private static long counter = Times.NanoTime();
// Token: 0x040069EB RID: 27115
[Token(Token = "0x40069EB")]
private static readonly SecureRandom master;
// Token: 0x040069EC RID: 27116
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40069EC")]
protected readonly IRandomGenerator generator;
// Token: 0x040069ED RID: 27117
[Token(Token = "0x40069ED")]
private static readonly double DoubleScale;
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B4 RID: 6580
[Token(Token = "0x20019B4")]
[Serializable]
public class SecurityUtilityException : Exception
{
// Token: 0x06009D4B RID: 40267 RVA: 0x0020F918 File Offset: 0x0020DB18
[Token(Token = "0x6009D4B")]
[Address(RVA = "0x1B22D20", Offset = "0x1B21B20", VA = "0x181B22D20")]
public SecurityUtilityException()
{
}
// Token: 0x06009D4C RID: 40268 RVA: 0x0020F92C File Offset: 0x0020DB2C
[Token(Token = "0x6009D4C")]
[Address(RVA = "0x1B22CB0", Offset = "0x1B21AB0", VA = "0x181B22CB0")]
public SecurityUtilityException(string message)
: base(message)
{
}
// Token: 0x06009D4D RID: 40269 RVA: 0x0020F940 File Offset: 0x0020DB40
[Token(Token = "0x6009D4D")]
[Address(RVA = "0x1B22C30", Offset = "0x1B21A30", VA = "0x181B22C30")]
public SecurityUtilityException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,34 @@
using System;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B5 RID: 6581
[Token(Token = "0x20019B5")]
[Serializable]
public class SignatureException : GeneralSecurityException
{
// Token: 0x06009D4E RID: 40270 RVA: 0x0020F958 File Offset: 0x0020DB58
[Token(Token = "0x6009D4E")]
[Address(RVA = "0x1B15680", Offset = "0x1B14480", VA = "0x181B15680")]
public SignatureException()
{
}
// Token: 0x06009D4F RID: 40271 RVA: 0x0020F96C File Offset: 0x0020DB6C
[Token(Token = "0x6009D4F")]
[Address(RVA = "0x1B15670", Offset = "0x1B14470", VA = "0x181B15670")]
public SignatureException(string message)
: base(message)
{
}
// Token: 0x06009D50 RID: 40272 RVA: 0x0020F980 File Offset: 0x0020DB80
[Token(Token = "0x6009D50")]
[Address(RVA = "0x1B15660", Offset = "0x1B14460", VA = "0x181B15660")]
public SignatureException(string message, Exception exception)
: base(message, exception)
{
}
}
}
@@ -0,0 +1,308 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B6 RID: 6582
[Token(Token = "0x20019B6")]
public sealed class SignerUtilities
{
// Token: 0x06009D51 RID: 40273 RVA: 0x0020F998 File Offset: 0x0020DB98
[Token(Token = "0x6009D51")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private SignerUtilities()
{
}
// Token: 0x06009D52 RID: 40274 RVA: 0x0020F9AC File Offset: 0x0020DBAC
[Token(Token = "0x6009D52")]
[Address(RVA = "0x1B24420", Offset = "0x1B23220", VA = "0x181B24420")]
static SignerUtilities()
{
/*
An exception occurred when decompiling this method (06009D52)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SignerUtilities::.cctor()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:IDictionary(var_1_07, call:IDictionary(Platform::CreateHashtable))
stsfld:IDictionary(SignerUtilities::algorithms, ldloc:IDictionary(var_1_07))
stsfld:IDictionary(SignerUtilities::oids, call:IDictionary(Platform::CreateHashtable))
stloc:IDictionary(var_3_1F, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_5_25, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_7_2C, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_8_33, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD2WithRsaEncryption))
stloc:IDictionary(var_10_3A, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_12_41, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_14_48, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_15_4F, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD4WithRsaEncryption))
stloc:IDictionary(var_17_56, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_18_5D, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::MD4WithRsa))
stloc:IDictionary(var_20_64, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_21_6B, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::MD4WithRsaEncryption))
stloc:IDictionary(var_23_72, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_25_79, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_27_80, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_28_87, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::MD5WithRsaEncryption))
stloc:IDictionary(var_30_8E, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_31_95, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::MD5WithRsa))
stloc:IDictionary(var_33_9C, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_35_A3, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_37_AA, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_39_B1, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_40_B8, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::Sha1WithRsaEncryption))
stloc:IDictionary(var_42_BF, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_43_C6, ldsfld:DerObjectIdentifier(OiwObjectIdentifiers::Sha1WithRsa))
stloc:IDictionary(var_45_CD, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_47_D4, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_49_DB, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_50_E2, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::Sha224WithRsaEncryption))
stloc:IDictionary(var_52_E9, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_54_F0, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_56_F7, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_58_FE, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_59_105, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::Sha256WithRsaEncryption))
stloc:IDictionary(var_61_10C, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_63_113, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_65_11A, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_67_121, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_68_128, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::Sha384WithRsaEncryption))
stloc:IDictionary(var_70_12F, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_72_136, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_74_13D, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_76_144, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_77_14B, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::Sha512WithRsaEncryption))
stloc:IDictionary(var_79_152, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_81_159, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_83_160, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_85_167, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_86_16E, ldsfld:DerObjectIdentifier(PkcsObjectIdentifiers::IdRsassaPss))
stloc:IDictionary(var_88_175, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_90_17C, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_92_183, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_94_18A, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_96_191, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_98_198, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_100_19F, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_102_1A6, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_104_1AD, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_106_1B4, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_108_1BB, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_110_1C2, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_112_1C9, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_114_1D0, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_116_1D7, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_118_1DE, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_120_1E5, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_122_1EC, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_124_1F3, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_126_1FA, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_128_201, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_130_208, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_132_20F, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_134_216, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_135_21D, ldsfld:DerObjectIdentifier(TeleTrusTObjectIdentifiers::RsaSignatureWithRipeMD128))
stloc:IDictionary(var_137_224, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_139_22B, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_141_232, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_142_239, ldsfld:DerObjectIdentifier(TeleTrusTObjectIdentifiers::RsaSignatureWithRipeMD160))
stloc:IDictionary(var_144_240, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_146_247, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_148_24E, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:DerObjectIdentifier(var_149_255, ldsfld:DerObjectIdentifier(TeleTrusTObjectIdentifiers::RsaSignatureWithRipeMD256))
stloc:IDictionary(var_151_25C, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_153_263, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_155_26A, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_157_271, ldsfld:IDictionary(SignerUtilities::algorithms))
stloc:IDictionary(var_159_278, ldsfld:IDictionary(SignerUtilities::algorithms))
}
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: 0x06009D53 RID: 40275 RVA: 0x0020FC34 File Offset: 0x0020DE34
[Token(Token = "0x6009D53")]
[Address(RVA = "0x1B230B0", Offset = "0x1B21EB0", VA = "0x181B230B0")]
public static DerObjectIdentifier GetObjectIdentifier(string mechanism)
{
/*
An exception occurred when decompiling this method (06009D53)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.DerObjectIdentifier BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SignerUtilities::GetObjectIdentifier(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2E:
stloc:ArgumentNullException(var_7_38, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("mechanism")))
}
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: 0x17001908 RID: 6408
// (get) Token: 0x06009D54 RID: 40276 RVA: 0x0020FC7C File Offset: 0x0020DE7C
[Token(Token = "0x17001908")]
public static ICollection Algorithms
{
[Token(Token = "0x6009D54")]
[Address(RVA = "0x1B29440", Offset = "0x1B28240", VA = "0x181B29440")]
get
{
IDictionary dictionary = SignerUtilities.oids;
throw new NullReferenceException();
}
}
// Token: 0x06009D55 RID: 40277 RVA: 0x0020FC94 File Offset: 0x0020DE94
[Token(Token = "0x6009D55")]
[Address(RVA = "0x1B22FA0", Offset = "0x1B21DA0", VA = "0x181B22FA0")]
public static Asn1Encodable GetDefaultX509Parameters(DerObjectIdentifier id)
{
return SignerUtilities.GetDefaultX509Parameters(id.identifier);
}
// Token: 0x06009D56 RID: 40278 RVA: 0x0020FCB4 File Offset: 0x0020DEB4
[Token(Token = "0x6009D56")]
[Address(RVA = "0x1B22D80", Offset = "0x1B21B80", VA = "0x181B22D80")]
public static Asn1Encodable GetDefaultX509Parameters(string algorithm)
{
/*
An exception occurred when decompiling this method (06009D56)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Encodable BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SignerUtilities::GetDefaultX509Parameters(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_49:
stloc:ArgumentNullException(var_5_53, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("algorithm")))
}
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: 0x06009D57 RID: 40279 RVA: 0x0020FD18 File Offset: 0x0020DF18
[Token(Token = "0x6009D57")]
[Address(RVA = "0x1B23260", Offset = "0x1B22060", VA = "0x181B23260")]
private static Asn1Encodable GetPssX509Parameters(string digestName)
{
DerObjectIdentifier objectIdentifier = DigestUtilities.GetObjectIdentifier(digestName);
DerNull instance = DerNull.Instance;
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(objectIdentifier, instance);
AlgorithmIdentifier algorithmIdentifier2 = new AlgorithmIdentifier(PkcsObjectIdentifiers.IdMgf1, algorithmIdentifier);
IDigest digest = DigestUtilities.GetDigest(digestName);
DerInteger derInteger = new DerInteger(1);
DerInteger derInteger2;
RsassaPssParameters rsassaPssParameters = new RsassaPssParameters(algorithmIdentifier, algorithmIdentifier2, derInteger2, derInteger);
throw new NullReferenceException();
}
// Token: 0x06009D58 RID: 40280 RVA: 0x0020FD68 File Offset: 0x0020DF68
[Token(Token = "0x6009D58")]
[Address(RVA = "0x1B24130", Offset = "0x1B22F30", VA = "0x181B24130")]
public static ISigner GetSigner(DerObjectIdentifier id)
{
return SignerUtilities.GetSigner(id.identifier);
}
// Token: 0x06009D59 RID: 40281 RVA: 0x0020FD88 File Offset: 0x0020DF88
[Token(Token = "0x6009D59")]
[Address(RVA = "0x1B23420", Offset = "0x1B22220", VA = "0x181B23420")]
public static ISigner GetSigner(string algorithm)
{
/*
An exception occurred when decompiling this method (06009D59)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ISigner BestHTTP.SecureProtocol.Org.BouncyCastle.Security.SignerUtilities::GetSigner(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_30D:
stloc:SecurityUtilityException(var_86_314, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, ldloc:string(var_85)))
}
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: 0x06009D5A RID: 40282 RVA: 0x002100AC File Offset: 0x0020E2AC
[Token(Token = "0x6009D5A")]
[Address(RVA = "0x1B23000", Offset = "0x1B21E00", VA = "0x181B23000")]
public static string GetEncodingName(DerObjectIdentifier oid)
{
IDictionary dictionary = SignerUtilities.algorithms;
throw new NullReferenceException();
}
// Token: 0x06009D5B RID: 40283 RVA: 0x002100C4 File Offset: 0x0020E2C4
[Token(Token = "0x6009D5B")]
[Address(RVA = "0x1B242B0", Offset = "0x1B230B0", VA = "0x181B242B0")]
public static ISigner InitSigner(DerObjectIdentifier algorithmOid, bool forSigning, AsymmetricKeyParameter privateKey, SecureRandom random)
{
ISigner signer = SignerUtilities.GetSigner(algorithmOid.identifier);
if (random != 0)
{
ParametersWithRandom parametersWithRandom = new ParametersWithRandom(privateKey, random);
}
return signer;
}
// Token: 0x06009D5C RID: 40284 RVA: 0x002100F0 File Offset: 0x0020E2F0
[Token(Token = "0x6009D5C")]
[Address(RVA = "0x1B24190", Offset = "0x1B22F90", VA = "0x181B24190")]
public static ISigner InitSigner(string algorithm, bool forSigning, AsymmetricKeyParameter privateKey, SecureRandom random)
{
ISigner signer = SignerUtilities.GetSigner(algorithm);
if (random != 0)
{
ParametersWithRandom parametersWithRandom = new ParametersWithRandom(privateKey, random);
}
return signer;
}
// Token: 0x040069EE RID: 27118
[Token(Token = "0x40069EE")]
internal static readonly IDictionary algorithms;
// Token: 0x040069EF RID: 27119
[Token(Token = "0x40069EF")]
internal static readonly IDictionary oids;
}
}
@@ -0,0 +1,223 @@
using System;
using System.Collections;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Kisa;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Nist;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Ntt;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Pkcs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020019B7 RID: 6583
[Token(Token = "0x20019B7")]
public sealed class WrapperUtilities
{
// Token: 0x06009D5D RID: 40285 RVA: 0x00210118 File Offset: 0x0020E318
[Token(Token = "0x6009D5D")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
private WrapperUtilities()
{
}
// Token: 0x06009D5E RID: 40286 RVA: 0x0021012C File Offset: 0x0020E32C
[Token(Token = "0x6009D5E")]
[Address(RVA = "0x1B2E130", Offset = "0x1B2CF30", VA = "0x181B2E130")]
static WrapperUtilities()
{
IDictionary dictionary = Platform.CreateHashtable();
Enum arbitraryValue = Enums.GetArbitraryValue(typeof(WrapperUtilities.WrapAlgorithm));
DerObjectIdentifier idAes128Wrap = NistObjectIdentifiers.IdAes128Wrap;
DerObjectIdentifier idAes192Wrap = NistObjectIdentifiers.IdAes192Wrap;
DerObjectIdentifier idAes256Wrap = NistObjectIdentifiers.IdAes256Wrap;
DerObjectIdentifier idCamellia128Wrap = NttObjectIdentifiers.IdCamellia128Wrap;
DerObjectIdentifier idCamellia192Wrap = NttObjectIdentifiers.IdCamellia192Wrap;
DerObjectIdentifier idCamellia256Wrap = NttObjectIdentifiers.IdCamellia256Wrap;
DerObjectIdentifier idAlgCms3DesWrap = PkcsObjectIdentifiers.IdAlgCms3DesWrap;
DerObjectIdentifier idAlgCmsRC2Wrap = PkcsObjectIdentifiers.IdAlgCmsRC2Wrap;
DerObjectIdentifier idNpkiAppCmsSeedWrap = KisaObjectIdentifiers.IdNpkiAppCmsSeedWrap;
}
// Token: 0x06009D5F RID: 40287 RVA: 0x002101A0 File Offset: 0x0020E3A0
[Token(Token = "0x6009D5F")]
[Address(RVA = "0x1B2E0D0", Offset = "0x1B2CED0", VA = "0x181B2E0D0")]
public static IWrapper GetWrapper(DerObjectIdentifier oid)
{
return WrapperUtilities.GetWrapper(oid.identifier);
}
// Token: 0x06009D60 RID: 40288 RVA: 0x002101C0 File Offset: 0x0020E3C0
[Token(Token = "0x6009D60")]
[Address(RVA = "0x1B2DD30", Offset = "0x1B2CB30", VA = "0x181B2DD30")]
public static IWrapper GetWrapper(string algorithm)
{
/*
An exception occurred when decompiling this method (06009D60)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IWrapper BestHTTP.SecureProtocol.Org.BouncyCastle.Security.WrapperUtilities::GetWrapper(System.String)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_94:
stloc:SecurityUtilityException(var_13_A9, newobj:SecurityUtilityException(SecurityUtilityException::.ctor, call:string(string::Concat, ldstr:string("Wrapper "), ldloc:string(algorithm), ldstr:string(" not recognised."))))
}
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: 0x06009D61 RID: 40289 RVA: 0x00210278 File Offset: 0x0020E478
[Token(Token = "0x6009D61")]
[Address(RVA = "0x1B2DC80", Offset = "0x1B2CA80", VA = "0x181B2DC80")]
public static string GetAlgorithmName(DerObjectIdentifier oid)
{
throw new NullReferenceException();
}
// Token: 0x040069F0 RID: 27120
[Token(Token = "0x40069F0")]
private static readonly IDictionary algorithms;
// Token: 0x020019B8 RID: 6584
[Token(Token = "0x20019B8")]
private enum WrapAlgorithm
{
// Token: 0x040069F2 RID: 27122
[Token(Token = "0x40069F2")]
AESWRAP,
// Token: 0x040069F3 RID: 27123
[Token(Token = "0x40069F3")]
CAMELLIAWRAP,
// Token: 0x040069F4 RID: 27124
[Token(Token = "0x40069F4")]
DESEDEWRAP,
// Token: 0x040069F5 RID: 27125
[Token(Token = "0x40069F5")]
RC2WRAP,
// Token: 0x040069F6 RID: 27126
[Token(Token = "0x40069F6")]
SEEDWRAP,
// Token: 0x040069F7 RID: 27127
[Token(Token = "0x40069F7")]
DESEDERFC3211WRAP,
// Token: 0x040069F8 RID: 27128
[Token(Token = "0x40069F8")]
AESRFC3211WRAP,
// Token: 0x040069F9 RID: 27129
[Token(Token = "0x40069F9")]
CAMELLIARFC3211WRAP
}
// Token: 0x020019B9 RID: 6585
[Token(Token = "0x20019B9")]
private class BufferedCipherWrapper : IWrapper
{
// Token: 0x06009D62 RID: 40290 RVA: 0x0021028C File Offset: 0x0020E48C
[Token(Token = "0x6009D62")]
[Address(RVA = "0x3FFB80", Offset = "0x3FE980", VA = "0x1803FFB80")]
public BufferedCipherWrapper(IBufferedCipher cipher)
{
this.cipher = cipher;
}
// Token: 0x17001909 RID: 6409
// (get) Token: 0x06009D63 RID: 40291 RVA: 0x002102A8 File Offset: 0x0020E4A8
[Token(Token = "0x17001909")]
public string AlgorithmName
{
[Token(Token = "0x6009D63")]
[Address(RVA = "0x1B14F30", Offset = "0x1B13D30", VA = "0x181B14F30", Slot = "4")]
get
{
IBufferedCipher bufferedCipher = this.cipher;
int num = 0;
num += num;
num++;
return bufferedCipher.AlgorithmName;
}
}
// Token: 0x06009D64 RID: 40292 RVA: 0x002102DC File Offset: 0x0020E4DC
[Token(Token = "0x6009D64")]
[Address(RVA = "0x1B14D40", Offset = "0x1B13B40", VA = "0x181B14D40", Slot = "5")]
public void Init(bool forWrapping, ICipherParameters parameters)
{
IBufferedCipher bufferedCipher = this.cipher;
this.forWrapping = forWrapping;
}
// Token: 0x06009D65 RID: 40293 RVA: 0x00210300 File Offset: 0x0020E500
[Token(Token = "0x6009D65")]
[Address(RVA = "0x1B14E70", Offset = "0x1B13C70", VA = "0x181B14E70", Slot = "6")]
public byte[] Wrap(byte[] input, int inOff, int length)
{
/*
An exception occurred when decompiling this method (06009D65)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Security.WrapperUtilities/BufferedCipherWrapper::Wrap(System.Byte[],System.Int32,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_10:
stloc:InvalidOperationException(var_1_1A, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Not initialised for wrapping")))
}
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: 0x06009D66 RID: 40294 RVA: 0x00210328 File Offset: 0x0020E528
[Token(Token = "0x6009D66")]
[Address(RVA = "0x1B14DB0", Offset = "0x1B13BB0", VA = "0x181B14DB0", Slot = "7")]
public byte[] Unwrap(byte[] input, int inOff, int length)
{
/*
An exception occurred when decompiling this method (06009D66)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Security.WrapperUtilities/BufferedCipherWrapper::Unwrap(System.Byte[],System.Int32,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_10:
stloc:InvalidOperationException(var_1_1A, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Not initialised for unwrapping")))
}
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: 0x040069FA RID: 27130
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40069FA")]
private readonly IBufferedCipher cipher;
// Token: 0x040069FB RID: 27131
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40069FB")]
private bool forWrapping;
}
}
}