a
This commit is contained in:
+126
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Prng
|
||||
{
|
||||
// Token: 0x02001BBE RID: 7102
|
||||
[Token(Token = "0x2001BBE")]
|
||||
public class BasicEntropySourceProvider : IEntropySourceProvider
|
||||
{
|
||||
// Token: 0x0600B1B3 RID: 45491 RVA: 0x0026B1A4 File Offset: 0x002693A4
|
||||
[Token(Token = "0x600B1B3")]
|
||||
[Address(RVA = "0x42C280", Offset = "0x42B080", VA = "0x18042C280")]
|
||||
public BasicEntropySourceProvider(SecureRandom secureRandom, bool isPredictionResistant)
|
||||
{
|
||||
this.mSecureRandom = secureRandom;
|
||||
this.mPredictionResistant = isPredictionResistant;
|
||||
}
|
||||
|
||||
// Token: 0x0600B1B4 RID: 45492 RVA: 0x0026B1C8 File Offset: 0x002693C8
|
||||
[Token(Token = "0x600B1B4")]
|
||||
[Address(RVA = "0x17FEDC0", Offset = "0x17FDBC0", VA = "0x1817FEDC0", Slot = "4")]
|
||||
public IEntropySource Get(int bitsRequired)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B1B4)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IEntropySource BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Prng.BasicEntropySourceProvider::Get(System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
Block_0:
|
||||
stloc:SecureRandom(var_0_06, ldfld:SecureRandom(BasicEntropySourceProvider::mSecureRandom, ldloc:BasicEntropySourceProvider(this)))
|
||||
stloc:bool(var_1_0D, ldfld:bool(BasicEntropySourceProvider::mPredictionResistant, ldloc:BasicEntropySourceProvider(this)))
|
||||
stfld:bool(BasicEntropySource::mPredictionResistant, ldloc:BasicEntropySource(var_2), ldloc:bool(var_1_0D))
|
||||
stfld:int32(BasicEntropySource::mEntropySize, ldloc:BasicEntropySource(var_2), ldloc:int32(bitsRequired))
|
||||
stfld:SecureRandom(BasicEntropySource::mSecureRandom, ldloc:BasicEntropySource(var_2), ldloc:SecureRandom(var_0_06))
|
||||
}
|
||||
|
||||
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: 0x04007132 RID: 28978
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007132")]
|
||||
private readonly SecureRandom mSecureRandom;
|
||||
|
||||
// Token: 0x04007133 RID: 28979
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007133")]
|
||||
private readonly bool mPredictionResistant;
|
||||
|
||||
// Token: 0x02001BBF RID: 7103
|
||||
[Token(Token = "0x2001BBF")]
|
||||
private class BasicEntropySource : IEntropySource
|
||||
{
|
||||
// Token: 0x0600B1B5 RID: 45493 RVA: 0x0026B1F8 File Offset: 0x002693F8
|
||||
[Token(Token = "0x600B1B5")]
|
||||
[Address(RVA = "0x17FEEB0", Offset = "0x17FDCB0", VA = "0x1817FEEB0")]
|
||||
internal BasicEntropySource(SecureRandom secureRandom, bool predictionResistant, int entropySize)
|
||||
{
|
||||
this.mSecureRandom = secureRandom;
|
||||
this.mPredictionResistant = predictionResistant;
|
||||
this.mEntropySize = entropySize;
|
||||
}
|
||||
|
||||
// Token: 0x17001BF0 RID: 7152
|
||||
// (get) Token: 0x0600B1B6 RID: 45494 RVA: 0x0026B220 File Offset: 0x00269420
|
||||
[Token(Token = "0x17001BF0")]
|
||||
bool IEntropySource.IsPredictionResistant
|
||||
{
|
||||
[Token(Token = "0x600B1B6")]
|
||||
[Address(RVA = "0x42C2C0", Offset = "0x42B0C0", VA = "0x18042C2C0", Slot = "4")]
|
||||
get
|
||||
{
|
||||
return this.mPredictionResistant;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B1B7 RID: 45495 RVA: 0x0026B234 File Offset: 0x00269434
|
||||
[Token(Token = "0x600B1B7")]
|
||||
[Address(RVA = "0x17FEE40", Offset = "0x17FDC40", VA = "0x1817FEE40", Slot = "5")]
|
||||
byte[] IEntropySource.GetEntropy()
|
||||
{
|
||||
SecureRandom secureRandom = this.mSecureRandom;
|
||||
byte[] array;
|
||||
return array;
|
||||
}
|
||||
|
||||
// Token: 0x17001BF1 RID: 7153
|
||||
// (get) Token: 0x0600B1B8 RID: 45496 RVA: 0x0026B24C File Offset: 0x0026944C
|
||||
[Token(Token = "0x17001BF1")]
|
||||
int IEntropySource.EntropySize
|
||||
{
|
||||
[Token(Token = "0x600B1B8")]
|
||||
[Address(RVA = "0x41F5B0", Offset = "0x41E3B0", VA = "0x18041F5B0", Slot = "6")]
|
||||
get
|
||||
{
|
||||
return this.mEntropySize;
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x04007134 RID: 28980
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x4007134")]
|
||||
private readonly SecureRandom mSecureRandom;
|
||||
|
||||
// Token: 0x04007135 RID: 28981
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x4007135")]
|
||||
private readonly bool mPredictionResistant;
|
||||
|
||||
// Token: 0x04007136 RID: 28982
|
||||
[FieldOffset(Offset = "0x1C")]
|
||||
[Token(Token = "0x4007136")]
|
||||
private readonly int mEntropySize;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user