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

151 lines
6.4 KiB
C#

using System;
using System.Runtime.InteropServices;
using System.Threading;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Prng
{
// Token: 0x020015EA RID: 5610
[Token(Token = "0x20015EA")]
[StructLayout(3)]
public class ReversedWindowGenerator : IRandomGenerator
{
// Token: 0x060095FD RID: 38397 RVA: 0x00214108 File Offset: 0x00212308
[Token(Token = "0x60095FD")]
[Address(RVA = "0x1E491D0", Offset = "0x1E47BD0", VA = "0x181E491D0")]
public ReversedWindowGenerator(IRandomGenerator generator, int windowSize)
{
/*
An exception occurred when decompiling this method (060095FD)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Prng.ReversedWindowGenerator::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Prng.IRandomGenerator,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_20:
stloc:ArgumentNullException(var_1_2A, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("generator")))
}
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: 0x060095FE RID: 38398 RVA: 0x00214140 File Offset: 0x00212340
[Token(Token = "0x60095FE")]
[Address(RVA = "0x1E49090", Offset = "0x1E47A90", VA = "0x181E49090", Slot = "8")]
public virtual void AddSeedMaterial(byte[] seed)
{
int num;
do
{
num = 0;
this.windowCount = num;
IRandomGenerator randomGenerator = this.generator;
Monitor.Exit(this);
if (num != -1)
{
}
}
while (num != 0);
}
// Token: 0x060095FF RID: 38399 RVA: 0x00214174 File Offset: 0x00212374
[Token(Token = "0x60095FF")]
[Address(RVA = "0x1E48F40", Offset = "0x1E47940", VA = "0x181E48F40", Slot = "9")]
public virtual void AddSeedMaterial(long seed)
{
int num;
do
{
num = 0;
int num2 = 0;
this.windowCount = num;
IRandomGenerator randomGenerator = this.generator;
if (num < num2)
{
num += num;
num++;
}
Monitor.Exit(this);
if (num != -1)
{
}
}
while (num != 0);
}
// Token: 0x06009600 RID: 38400 RVA: 0x002141B4 File Offset: 0x002123B4
[Token(Token = "0x6009600")]
[Address(RVA = "0x1E491A0", Offset = "0x1E47BA0", VA = "0x181E491A0", Slot = "10")]
public virtual void NextBytes(byte[] bytes)
{
int length = bytes.Length;
int num = 0;
this.doNextBytes(bytes, num, length);
}
// Token: 0x06009601 RID: 38401 RVA: 0x002141DC File Offset: 0x002123DC
[Token(Token = "0x6009601")]
[Address(RVA = "0x1E49190", Offset = "0x1E47B90", VA = "0x181E49190", Slot = "11")]
public virtual void NextBytes(byte[] bytes, int start, int len)
{
this.doNextBytes(bytes, start, len);
}
// Token: 0x06009602 RID: 38402 RVA: 0x002141F4 File Offset: 0x002123F4
[Token(Token = "0x6009602")]
[Address(RVA = "0x1E492B0", Offset = "0x1E47CB0", VA = "0x181E492B0")]
private void doNextBytes(byte[] bytes, int start, int len)
{
int num;
do
{
num = 0;
if (num < len)
{
int num2 = this.windowCount;
if (num2 < 1)
{
IRandomGenerator randomGenerator = this.generator;
int length = this.window.Length;
byte[] array = this.window;
}
byte[] array2 = this.window;
num++;
int num3 = num2 - 1;
this.windowCount = num3;
}
Monitor.Exit(this);
if (num != -1)
{
}
}
while (num != 0);
}
// Token: 0x04006300 RID: 25344
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006300")]
private readonly IRandomGenerator generator;
// Token: 0x04006301 RID: 25345
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006301")]
private byte[] window;
// Token: 0x04006302 RID: 25346
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006302")]
private int windowCount;
}
}