Files
Apr2020-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Crypto/PbeParametersGenerator.cs
T
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

227 lines
8.7 KiB
C#

using System;
using System.Text;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
{
// Token: 0x02001AED RID: 6893
[Token(Token = "0x2001AED")]
public abstract class PbeParametersGenerator
{
// Token: 0x0600AB18 RID: 43800 RVA: 0x00255004 File Offset: 0x00253204
[Token(Token = "0x600AB18")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
protected PbeParametersGenerator()
{
}
// Token: 0x0600AB19 RID: 43801 RVA: 0x00255018 File Offset: 0x00253218
[Token(Token = "0x600AB19")]
[Address(RVA = "0x1811020", Offset = "0x180FE20", VA = "0x181811020", Slot = "4")]
public virtual void Init(byte[] password, byte[] salt, int iterationCount)
{
/*
An exception occurred when decompiling this method (0600AB19)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.PbeParametersGenerator::Init(System.Byte[],System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_37:
stloc:ArgumentNullException(var_3_41, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("salt")))
}
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 1660
*/;
}
// Token: 0x17001B2D RID: 6957
// (get) Token: 0x0600AB1A RID: 43802 RVA: 0x00255068 File Offset: 0x00253268
[Token(Token = "0x17001B2D")]
public virtual byte[] Password
{
[Token(Token = "0x600AB1A")]
[Address(RVA = "0x1811420", Offset = "0x1810220", VA = "0x181811420", Slot = "5")]
get
{
return Arrays.Clone(this.mPassword);
}
}
// Token: 0x0600AB1B RID: 43803 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600AB1B")]
[Address(RVA = "0x45E0C0", Offset = "0x45CEC0", VA = "0x18045E0C0")]
[Obsolete]
public byte[] GetPassword()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x17001B2E RID: 6958
// (get) Token: 0x0600AB1C RID: 43804 RVA: 0x00255080 File Offset: 0x00253280
[Token(Token = "0x17001B2E")]
public virtual byte[] Salt
{
[Token(Token = "0x600AB1C")]
[Address(RVA = "0x1811480", Offset = "0x1810280", VA = "0x181811480", Slot = "6")]
get
{
return Arrays.Clone(this.mSalt);
}
}
// Token: 0x0600AB1D RID: 43805 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600AB1D")]
[Address(RVA = "0x466260", Offset = "0x465060", VA = "0x180466260")]
[Obsolete]
public byte[] GetSalt()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x17001B2F RID: 6959
// (get) Token: 0x0600AB1E RID: 43806 RVA: 0x00255098 File Offset: 0x00253298
[Token(Token = "0x17001B2F")]
public virtual int IterationCount
{
[Token(Token = "0x600AB1E")]
[Address(RVA = "0x3F7310", Offset = "0x3F6110", VA = "0x1803F7310", Slot = "7")]
get
{
return this.mIterationCount;
}
}
// Token: 0x0600AB1F RID: 43807
[Token(Token = "0x600AB1F")]
[Address(Slot = "8")]
[Obsolete]
public abstract ICipherParameters GenerateDerivedParameters(int keySize);
// Token: 0x0600AB20 RID: 43808
[Token(Token = "0x600AB20")]
[Address(Slot = "9")]
public abstract ICipherParameters GenerateDerivedParameters(string algorithm, int keySize);
// Token: 0x0600AB21 RID: 43809
[Token(Token = "0x600AB21")]
[Address(Slot = "10")]
[Obsolete]
public abstract ICipherParameters GenerateDerivedParameters(int keySize, int ivSize);
// Token: 0x0600AB22 RID: 43810
[Token(Token = "0x600AB22")]
[Address(Slot = "11")]
public abstract ICipherParameters GenerateDerivedParameters(string algorithm, int keySize, int ivSize);
// Token: 0x0600AB23 RID: 43811
[Token(Token = "0x600AB23")]
[Address(Slot = "12")]
public abstract ICipherParameters GenerateDerivedMacParameters(int keySize);
// Token: 0x0600AB24 RID: 43812 RVA: 0x002550AC File Offset: 0x002532AC
[Token(Token = "0x600AB24")]
[Address(RVA = "0x18112F0", Offset = "0x18100F0", VA = "0x1818112F0")]
public static byte[] Pkcs5PasswordToBytes(char[] password)
{
while (password == 0)
{
}
return Strings.ToByteArray(password);
}
// Token: 0x0600AB25 RID: 43813 RVA: 0x002550C4 File Offset: 0x002532C4
[Token(Token = "0x600AB25")]
[Address(RVA = "0x18112A0", Offset = "0x18100A0", VA = "0x1818112A0")]
[Obsolete]
public static byte[] Pkcs5PasswordToBytes(string password)
{
while (password == 0)
{
}
return Strings.ToByteArray(password);
}
// Token: 0x0600AB26 RID: 43814 RVA: 0x002550DC File Offset: 0x002532DC
[Token(Token = "0x600AB26")]
[Address(RVA = "0x1811340", Offset = "0x1810140", VA = "0x181811340")]
public static byte[] Pkcs5PasswordToUtf8Bytes(char[] password)
{
if (password != 0)
{
Encoding utf = Encoding.UTF8;
}
throw new NullReferenceException();
}
// Token: 0x0600AB27 RID: 43815 RVA: 0x002550FC File Offset: 0x002532FC
[Token(Token = "0x600AB27")]
[Address(RVA = "0x18113B0", Offset = "0x18101B0", VA = "0x1818113B0")]
[Obsolete]
public static byte[] Pkcs5PasswordToUtf8Bytes(string password)
{
if (password != 0)
{
Encoding utf = Encoding.UTF8;
}
throw new NullReferenceException();
}
// Token: 0x0600AB28 RID: 43816 RVA: 0x0025511C File Offset: 0x0025331C
[Token(Token = "0x600AB28")]
[Address(RVA = "0x1811120", Offset = "0x180FF20", VA = "0x181811120")]
public static byte[] Pkcs12PasswordToBytes(char[] password)
{
if (password != 0)
{
byte[] array = new byte[password.Length];
Encoding bigEndianUnicode = Encoding.BigEndianUnicode;
int num = 0;
int length = password.Length;
byte[] bytes = bigEndianUnicode.GetBytes(password, num, length);
return array;
}
return new byte[0];
}
// Token: 0x0600AB29 RID: 43817 RVA: 0x00255168 File Offset: 0x00253368
[Token(Token = "0x600AB29")]
[Address(RVA = "0x18111E0", Offset = "0x180FFE0", VA = "0x1818111E0")]
public static byte[] Pkcs12PasswordToBytes(char[] password, bool wrongPkcs12Zero)
{
if (password != 0)
{
byte[] array = new byte[password.Length];
Encoding bigEndianUnicode = Encoding.BigEndianUnicode;
int num = 0;
int length = password.Length;
byte[] bytes = bigEndianUnicode.GetBytes(password, num, length);
return array;
}
throw new NullReferenceException();
}
// Token: 0x04006CA9 RID: 27817
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006CA9")]
protected byte[] mPassword;
// Token: 0x04006CAA RID: 27818
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006CAA")]
protected byte[] mSalt;
// Token: 0x04006CAB RID: 27819
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006CAB")]
protected int mIterationCount;
}
}