scripts
This commit is contained in:
+140
@@ -0,0 +1,140 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
|
||||
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
|
||||
{
|
||||
// Token: 0x020016C6 RID: 5830
|
||||
[Token(Token = "0x20016C6")]
|
||||
[StructLayout(3)]
|
||||
public class RsaBlindedEngine : IAsymmetricBlockCipher
|
||||
{
|
||||
// Token: 0x06009C86 RID: 40070 RVA: 0x00238488 File Offset: 0x00236688
|
||||
[Token(Token = "0x6009C86")]
|
||||
[Address(RVA = "0x20FCB10", Offset = "0x20FB510", VA = "0x1820FCB10")]
|
||||
public RsaBlindedEngine()
|
||||
{
|
||||
RsaCoreEngine rsaCoreEngine = new RsaCoreEngine();
|
||||
base..ctor();
|
||||
this.core = rsaCoreEngine;
|
||||
}
|
||||
|
||||
// Token: 0x06009C87 RID: 40071 RVA: 0x002384A8 File Offset: 0x002366A8
|
||||
[Token(Token = "0x6009C87")]
|
||||
[Address(RVA = "0x3C3A30", Offset = "0x3C2430", VA = "0x1803C3A30")]
|
||||
public RsaBlindedEngine(IRsa rsa)
|
||||
{
|
||||
this.core = rsa;
|
||||
}
|
||||
|
||||
// Token: 0x170018E6 RID: 6374
|
||||
// (get) Token: 0x06009C88 RID: 40072 RVA: 0x002384C4 File Offset: 0x002366C4
|
||||
[Token(Token = "0x170018E6")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x6009C88")]
|
||||
[Address(RVA = "0x20FCB70", Offset = "0x20FB570", VA = "0x1820FCB70", Slot = "9")]
|
||||
get
|
||||
{
|
||||
return "RSA";
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x06009C89 RID: 40073 RVA: 0x002384D8 File Offset: 0x002366D8
|
||||
[Token(Token = "0x6009C89")]
|
||||
[Address(RVA = "0x20FC5F0", Offset = "0x20FAFF0", VA = "0x1820FC5F0", Slot = "10")]
|
||||
public virtual void Init(bool forEncryption, ICipherParameters param)
|
||||
{
|
||||
int num;
|
||||
for (;;)
|
||||
{
|
||||
IRsa rsa = this.core;
|
||||
if (param == 0)
|
||||
{
|
||||
goto IL_44;
|
||||
}
|
||||
if ((param != 0 || param != 0) && param != 0)
|
||||
{
|
||||
if (typeof(ParametersWithRandom).TypeHandle == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
num = 0;
|
||||
if (typeof(ParametersWithRandom).TypeHandle != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
this.key = typeof(ParametersWithRandom).TypeHandle;
|
||||
this.random = num;
|
||||
return;
|
||||
IL_44:
|
||||
int num2 = 0;
|
||||
this.key = num2;
|
||||
SecureRandom secureRandom = new SecureRandom();
|
||||
this.random = secureRandom;
|
||||
}
|
||||
|
||||
// Token: 0x06009C8A RID: 40074 RVA: 0x0023854C File Offset: 0x0023674C
|
||||
[Token(Token = "0x6009C8A")]
|
||||
[Address(RVA = "0x20FC550", Offset = "0x20FAF50", VA = "0x1820FC550", Slot = "11")]
|
||||
public virtual int GetInputBlockSize()
|
||||
{
|
||||
IRsa rsa = this.core;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009C8B RID: 40075 RVA: 0x00238568 File Offset: 0x00236768
|
||||
[Token(Token = "0x6009C8B")]
|
||||
[Address(RVA = "0x20FC5A0", Offset = "0x20FAFA0", VA = "0x1820FC5A0", Slot = "12")]
|
||||
public virtual int GetOutputBlockSize()
|
||||
{
|
||||
IRsa rsa = this.core;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x06009C8C RID: 40076 RVA: 0x00238584 File Offset: 0x00236784
|
||||
[Token(Token = "0x6009C8C")]
|
||||
[Address(RVA = "0x20FC7D0", Offset = "0x20FB1D0", VA = "0x1820FC7D0", Slot = "13")]
|
||||
public virtual byte[] ProcessBlock(byte[] inBuf, int inOff, int inLen)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (06009C8C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.RsaBlindedEngine::ProcessBlock(System.Byte[],System.Int32,System.Int32)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_AD:
|
||||
stloc:InvalidOperationException(var_19_B7, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("RSA engine not initialised")))
|
||||
}
|
||||
|
||||
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: 0x040066A3 RID: 26275
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40066A3")]
|
||||
private readonly IRsa core;
|
||||
|
||||
// Token: 0x040066A4 RID: 26276
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40066A4")]
|
||||
private RsaKeyParameters key;
|
||||
|
||||
// Token: 0x040066A5 RID: 26277
|
||||
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40066A5")]
|
||||
private SecureRandom random;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user