Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Security/CipherUtilities.cs
T
2026-04-08 23:40:05 +02:00

562 lines
28 KiB
C#

using System;
using System.Collections;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Security
{
// Token: 0x020013C4 RID: 5060
[Token(Token = "0x20013C4")]
[StructLayout(3)]
public sealed class CipherUtilities
{
// Token: 0x060080CF RID: 32975 RVA: 0x001B3B18 File Offset: 0x001B1D18
[Token(Token = "0x60080CF")]
[Address(RVA = "0x474A60", Offset = "0x473460", VA = "0x180474A60")]
static CipherUtilities()
{
/*
An exception occurred when decompiling this method (060080CF)
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: 0x060080D0 RID: 32976 RVA: 0x001B3DF8 File Offset: 0x001B1FF8
[Token(Token = "0x60080D0")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
private CipherUtilities()
{
}
// Token: 0x060080D1 RID: 32977 RVA: 0x001B3E0C File Offset: 0x001B200C
[Token(Token = "0x60080D1")]
[Address(RVA = "0x4748B0", Offset = "0x4732B0", VA = "0x1804748B0")]
public static DerObjectIdentifier GetObjectIdentifier(string mechanism)
{
/*
An exception occurred when decompiling this method (060080D1)
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: 0x17001503 RID: 5379
// (get) Token: 0x060080D2 RID: 32978 RVA: 0x001B3E54 File Offset: 0x001B2054
[Token(Token = "0x17001503")]
public static ICollection Algorithms
{
[Token(Token = "0x60080D2")]
[Address(RVA = "0x4761B0", Offset = "0x474BB0", VA = "0x1804761B0")]
get
{
IDictionary dictionary = CipherUtilities.oids;
throw new NullReferenceException();
}
}
// Token: 0x060080D3 RID: 32979 RVA: 0x001B3E6C File Offset: 0x001B206C
[Token(Token = "0x60080D3")]
[Address(RVA = "0x472D40", Offset = "0x471740", VA = "0x180472D40")]
public static IBufferedCipher GetCipher(DerObjectIdentifier oid)
{
return CipherUtilities.GetCipher(oid.identifier);
}
// Token: 0x060080D4 RID: 32980 RVA: 0x001B3E8C File Offset: 0x001B208C
[Token(Token = "0x60080D4")]
[Address(RVA = "0x472DA0", Offset = "0x4717A0", VA = "0x180472DA0")]
public static IBufferedCipher GetCipher(string algorithm)
{
/*
An exception occurred when decompiling this method (060080D4)
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_559:
stloc:ArgumentNullException(var_107_563, 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.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: 0x060080D5 RID: 32981 RVA: 0x001B4400 File Offset: 0x001B2600
[Token(Token = "0x60080D5")]
[Address(RVA = "0x472C90", Offset = "0x471690", VA = "0x180472C90")]
public static string GetAlgorithmName(DerObjectIdentifier oid)
{
IDictionary dictionary = CipherUtilities.algorithms;
throw new NullReferenceException();
}
// Token: 0x060080D6 RID: 32982 RVA: 0x001B4418 File Offset: 0x001B2618
[Token(Token = "0x60080D6")]
[Address(RVA = "0x474800", Offset = "0x473200", VA = "0x180474800")]
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: 0x060080D7 RID: 32983 RVA: 0x001B444C File Offset: 0x001B264C
[Token(Token = "0x60080D7")]
[Address(RVA = "0x4727D0", Offset = "0x4711D0", VA = "0x1804727D0")]
private static IBlockCipher CreateBlockCipher(CipherUtilities.CipherAlgorithm cipherAlgorithm)
{
if (cipherAlgorithm <= CipherUtilities.CipherAlgorithm.XTEA)
{
AesEngine aesEngine = new AesEngine();
BlowfishEngine blowfishEngine = new BlowfishEngine();
CamelliaEngine camelliaEngine = new CamelliaEngine();
Cast5Engine cast5Engine = new Cast5Engine();
Cast6Engine cast6Engine = new Cast6Engine();
DesEngine desEngine = new DesEngine();
DesEdeEngine desEdeEngine = new DesEdeEngine();
Gost28147Engine gost28147Engine = new Gost28147Engine();
IdeaEngine ideaEngine = new IdeaEngine();
NoekeonEngine noekeonEngine = new NoekeonEngine();
RC2Engine rc2Engine = new RC2Engine();
RC532Engine rc532Engine = new RC532Engine();
RC564Engine rc564Engine = new RC564Engine();
RC6Engine rc6Engine = new RC6Engine();
RijndaelEngine rijndaelEngine = new RijndaelEngine();
SeedEngine seedEngine = new SeedEngine();
SerpentEngine serpentEngine = new SerpentEngine();
SkipjackEngine skipjackEngine = new SkipjackEngine();
SM4Engine sm4Engine = new SM4Engine();
TeaEngine teaEngine = new TeaEngine();
uint num;
ThreefishEngine threefishEngine = new ThreefishEngine((int)num);
uint num2;
ThreefishEngine threefishEngine2 = new ThreefishEngine((int)num2);
uint num3;
ThreefishEngine threefishEngine3 = new ThreefishEngine((int)num3);
TnepresEngine tnepresEngine = new TnepresEngine();
TwofishEngine twofishEngine = new TwofishEngine();
XteaEngine xteaEngine = new XteaEngine();
}
SecurityUtilityException ex = new SecurityUtilityException("Cipher " + cipherAlgorithm + " not recognised or not a block cipher");
if (cipherAlgorithm > CipherUtilities.CipherAlgorithm.XTEA)
{
}
if ((cipherAlgorithm != CipherUtilities.CipherAlgorithm.XTEA && cipherAlgorithm == CipherUtilities.CipherAlgorithm.XTEA) || cipherAlgorithm == CipherUtilities.CipherAlgorithm.XTEA)
{
}
IDictionary dictionary = CipherUtilities.algorithms;
throw new NullReferenceException();
}
// Token: 0x04005B15 RID: 23317
[Token(Token = "0x4005B15")]
private static readonly IDictionary algorithms;
// Token: 0x04005B16 RID: 23318
[Token(Token = "0x4005B16")]
private static readonly IDictionary oids;
// Token: 0x020013C5 RID: 5061
[Token(Token = "0x20013C5")]
private enum CipherAlgorithm
{
// Token: 0x04005B18 RID: 23320
[Token(Token = "0x4005B18")]
AES,
// Token: 0x04005B19 RID: 23321
[Token(Token = "0x4005B19")]
ARC4,
// Token: 0x04005B1A RID: 23322
[Token(Token = "0x4005B1A")]
BLOWFISH,
// Token: 0x04005B1B RID: 23323
[Token(Token = "0x4005B1B")]
CAMELLIA,
// Token: 0x04005B1C RID: 23324
[Token(Token = "0x4005B1C")]
CAST5,
// Token: 0x04005B1D RID: 23325
[Token(Token = "0x4005B1D")]
CAST6,
// Token: 0x04005B1E RID: 23326
[Token(Token = "0x4005B1E")]
DES,
// Token: 0x04005B1F RID: 23327
[Token(Token = "0x4005B1F")]
DESEDE,
// Token: 0x04005B20 RID: 23328
[Token(Token = "0x4005B20")]
ELGAMAL,
// Token: 0x04005B21 RID: 23329
[Token(Token = "0x4005B21")]
GOST28147,
// Token: 0x04005B22 RID: 23330
[Token(Token = "0x4005B22")]
HC128,
// Token: 0x04005B23 RID: 23331
[Token(Token = "0x4005B23")]
HC256,
// Token: 0x04005B24 RID: 23332
[Token(Token = "0x4005B24")]
IDEA,
// Token: 0x04005B25 RID: 23333
[Token(Token = "0x4005B25")]
NOEKEON,
// Token: 0x04005B26 RID: 23334
[Token(Token = "0x4005B26")]
PBEWITHSHAAND128BITRC4,
// Token: 0x04005B27 RID: 23335
[Token(Token = "0x4005B27")]
PBEWITHSHAAND40BITRC4,
// Token: 0x04005B28 RID: 23336
[Token(Token = "0x4005B28")]
RC2,
// Token: 0x04005B29 RID: 23337
[Token(Token = "0x4005B29")]
RC5,
// Token: 0x04005B2A RID: 23338
[Token(Token = "0x4005B2A")]
RC5_64,
// Token: 0x04005B2B RID: 23339
[Token(Token = "0x4005B2B")]
RC6,
// Token: 0x04005B2C RID: 23340
[Token(Token = "0x4005B2C")]
RIJNDAEL,
// Token: 0x04005B2D RID: 23341
[Token(Token = "0x4005B2D")]
RSA,
// Token: 0x04005B2E RID: 23342
[Token(Token = "0x4005B2E")]
SALSA20,
// Token: 0x04005B2F RID: 23343
[Token(Token = "0x4005B2F")]
SEED,
// Token: 0x04005B30 RID: 23344
[Token(Token = "0x4005B30")]
SERPENT,
// Token: 0x04005B31 RID: 23345
[Token(Token = "0x4005B31")]
SKIPJACK,
// Token: 0x04005B32 RID: 23346
[Token(Token = "0x4005B32")]
SM4,
// Token: 0x04005B33 RID: 23347
[Token(Token = "0x4005B33")]
TEA,
// Token: 0x04005B34 RID: 23348
[Token(Token = "0x4005B34")]
THREEFISH_256,
// Token: 0x04005B35 RID: 23349
[Token(Token = "0x4005B35")]
THREEFISH_512,
// Token: 0x04005B36 RID: 23350
[Token(Token = "0x4005B36")]
THREEFISH_1024,
// Token: 0x04005B37 RID: 23351
[Token(Token = "0x4005B37")]
TNEPRES,
// Token: 0x04005B38 RID: 23352
[Token(Token = "0x4005B38")]
TWOFISH,
// Token: 0x04005B39 RID: 23353
[Token(Token = "0x4005B39")]
VMPC,
// Token: 0x04005B3A RID: 23354
[Token(Token = "0x4005B3A")]
VMPC_KSA3,
// Token: 0x04005B3B RID: 23355
[Token(Token = "0x4005B3B")]
XTEA
}
// Token: 0x020013C6 RID: 5062
[Token(Token = "0x20013C6")]
private enum CipherMode
{
// Token: 0x04005B3D RID: 23357
[Token(Token = "0x4005B3D")]
ECB,
// Token: 0x04005B3E RID: 23358
[Token(Token = "0x4005B3E")]
NONE,
// Token: 0x04005B3F RID: 23359
[Token(Token = "0x4005B3F")]
CBC,
// Token: 0x04005B40 RID: 23360
[Token(Token = "0x4005B40")]
CCM,
// Token: 0x04005B41 RID: 23361
[Token(Token = "0x4005B41")]
CFB,
// Token: 0x04005B42 RID: 23362
[Token(Token = "0x4005B42")]
CTR,
// Token: 0x04005B43 RID: 23363
[Token(Token = "0x4005B43")]
CTS,
// Token: 0x04005B44 RID: 23364
[Token(Token = "0x4005B44")]
EAX,
// Token: 0x04005B45 RID: 23365
[Token(Token = "0x4005B45")]
GCM,
// Token: 0x04005B46 RID: 23366
[Token(Token = "0x4005B46")]
GOFB,
// Token: 0x04005B47 RID: 23367
[Token(Token = "0x4005B47")]
OCB,
// Token: 0x04005B48 RID: 23368
[Token(Token = "0x4005B48")]
OFB,
// Token: 0x04005B49 RID: 23369
[Token(Token = "0x4005B49")]
OPENPGPCFB,
// Token: 0x04005B4A RID: 23370
[Token(Token = "0x4005B4A")]
SIC
}
// Token: 0x020013C7 RID: 5063
[Token(Token = "0x20013C7")]
private enum CipherPadding
{
// Token: 0x04005B4C RID: 23372
[Token(Token = "0x4005B4C")]
NOPADDING,
// Token: 0x04005B4D RID: 23373
[Token(Token = "0x4005B4D")]
RAW,
// Token: 0x04005B4E RID: 23374
[Token(Token = "0x4005B4E")]
ISO10126PADDING,
// Token: 0x04005B4F RID: 23375
[Token(Token = "0x4005B4F")]
ISO10126D2PADDING,
// Token: 0x04005B50 RID: 23376
[Token(Token = "0x4005B50")]
ISO10126_2PADDING,
// Token: 0x04005B51 RID: 23377
[Token(Token = "0x4005B51")]
ISO7816_4PADDING,
// Token: 0x04005B52 RID: 23378
[Token(Token = "0x4005B52")]
ISO9797_1PADDING,
// Token: 0x04005B53 RID: 23379
[Token(Token = "0x4005B53")]
ISO9796_1,
// Token: 0x04005B54 RID: 23380
[Token(Token = "0x4005B54")]
ISO9796_1PADDING,
// Token: 0x04005B55 RID: 23381
[Token(Token = "0x4005B55")]
OAEP,
// Token: 0x04005B56 RID: 23382
[Token(Token = "0x4005B56")]
OAEPPADDING,
// Token: 0x04005B57 RID: 23383
[Token(Token = "0x4005B57")]
OAEPWITHMD5ANDMGF1PADDING,
// Token: 0x04005B58 RID: 23384
[Token(Token = "0x4005B58")]
OAEPWITHSHA1ANDMGF1PADDING,
// Token: 0x04005B59 RID: 23385
[Token(Token = "0x4005B59")]
OAEPWITHSHA_1ANDMGF1PADDING,
// Token: 0x04005B5A RID: 23386
[Token(Token = "0x4005B5A")]
OAEPWITHSHA224ANDMGF1PADDING,
// Token: 0x04005B5B RID: 23387
[Token(Token = "0x4005B5B")]
OAEPWITHSHA_224ANDMGF1PADDING,
// Token: 0x04005B5C RID: 23388
[Token(Token = "0x4005B5C")]
OAEPWITHSHA256ANDMGF1PADDING,
// Token: 0x04005B5D RID: 23389
[Token(Token = "0x4005B5D")]
OAEPWITHSHA_256ANDMGF1PADDING,
// Token: 0x04005B5E RID: 23390
[Token(Token = "0x4005B5E")]
OAEPWITHSHA384ANDMGF1PADDING,
// Token: 0x04005B5F RID: 23391
[Token(Token = "0x4005B5F")]
OAEPWITHSHA_384ANDMGF1PADDING,
// Token: 0x04005B60 RID: 23392
[Token(Token = "0x4005B60")]
OAEPWITHSHA512ANDMGF1PADDING,
// Token: 0x04005B61 RID: 23393
[Token(Token = "0x4005B61")]
OAEPWITHSHA_512ANDMGF1PADDING,
// Token: 0x04005B62 RID: 23394
[Token(Token = "0x4005B62")]
PKCS1,
// Token: 0x04005B63 RID: 23395
[Token(Token = "0x4005B63")]
PKCS1PADDING,
// Token: 0x04005B64 RID: 23396
[Token(Token = "0x4005B64")]
PKCS5,
// Token: 0x04005B65 RID: 23397
[Token(Token = "0x4005B65")]
PKCS5PADDING,
// Token: 0x04005B66 RID: 23398
[Token(Token = "0x4005B66")]
PKCS7,
// Token: 0x04005B67 RID: 23399
[Token(Token = "0x4005B67")]
PKCS7PADDING,
// Token: 0x04005B68 RID: 23400
[Token(Token = "0x4005B68")]
TBCPADDING,
// Token: 0x04005B69 RID: 23401
[Token(Token = "0x4005B69")]
WITHCTS,
// Token: 0x04005B6A RID: 23402
[Token(Token = "0x4005B6A")]
X923PADDING,
// Token: 0x04005B6B RID: 23403
[Token(Token = "0x4005B6B")]
ZEROBYTEPADDING
}
}
}