a
This commit is contained in:
+172
@@ -0,0 +1,172 @@
|
||||
using System;
|
||||
using Cpp2IlInjected;
|
||||
|
||||
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers
|
||||
{
|
||||
// Token: 0x02001BB0 RID: 7088
|
||||
[Token(Token = "0x2001BB0")]
|
||||
public class GenericSigner : ISigner
|
||||
{
|
||||
// Token: 0x0600B12A RID: 45354 RVA: 0x00268114 File Offset: 0x00266314
|
||||
[Token(Token = "0x600B12A")]
|
||||
[Address(RVA = "0x4089A0", Offset = "0x4077A0", VA = "0x1804089A0")]
|
||||
public GenericSigner(IAsymmetricBlockCipher engine, IDigest digest)
|
||||
{
|
||||
this.engine = engine;
|
||||
this.digest = digest;
|
||||
}
|
||||
|
||||
// Token: 0x17001BE6 RID: 7142
|
||||
// (get) Token: 0x0600B12B RID: 45355 RVA: 0x00268138 File Offset: 0x00266338
|
||||
[Token(Token = "0x17001BE6")]
|
||||
public virtual string AlgorithmName
|
||||
{
|
||||
[Token(Token = "0x600B12B")]
|
||||
[Address(RVA = "0x18971D0", Offset = "0x1895FD0", VA = "0x1818971D0", Slot = "11")]
|
||||
get
|
||||
{
|
||||
string[] array = new string[5];
|
||||
if ("Generic(" != 0)
|
||||
{
|
||||
}
|
||||
array[0] = "Generic(";
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
if ("Generic(" != 0)
|
||||
{
|
||||
}
|
||||
array[1] = "Generic(";
|
||||
if ("/" != 0)
|
||||
{
|
||||
}
|
||||
array[2] = "/";
|
||||
IDigest digest = this.digest;
|
||||
if ("/" != 0)
|
||||
{
|
||||
}
|
||||
array[3] = "/";
|
||||
if (")" != 0)
|
||||
{
|
||||
}
|
||||
array[4] = ")";
|
||||
return string.Concat(array);
|
||||
}
|
||||
}
|
||||
|
||||
// Token: 0x0600B12C RID: 45356 RVA: 0x002681CC File Offset: 0x002663CC
|
||||
[Token(Token = "0x600B12C")]
|
||||
[Address(RVA = "0x1896CC0", Offset = "0x1895AC0", VA = "0x181896CC0", Slot = "12")]
|
||||
public virtual void Init(bool forSigning, ICipherParameters parameters)
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B12C)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.GenericSigner::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_4C:
|
||||
stloc:InvalidKeyException(var_8_56, newobj:InvalidKeyException(InvalidKeyException::.ctor, ldstr:string("Signing requires private key.")))
|
||||
stloc:InvalidKeyException(var_9_62, newobj:InvalidKeyException(InvalidKeyException::.ctor, ldstr:string("Verification requires public key.")))
|
||||
}
|
||||
|
||||
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 1660
|
||||
*/;
|
||||
}
|
||||
|
||||
// Token: 0x0600B12D RID: 45357 RVA: 0x0026823C File Offset: 0x0026643C
|
||||
[Token(Token = "0x600B12D")]
|
||||
[Address(RVA = "0x1896F90", Offset = "0x1895D90", VA = "0x181896F90", Slot = "13")]
|
||||
public virtual void Update(byte input)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B12E RID: 45358 RVA: 0x00268258 File Offset: 0x00266458
|
||||
[Token(Token = "0x600B12E")]
|
||||
[Address(RVA = "0x1896B40", Offset = "0x1895940", VA = "0x181896B40", Slot = "14")]
|
||||
public virtual void BlockUpdate(byte[] input, int inOff, int length)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
}
|
||||
|
||||
// Token: 0x0600B12F RID: 45359 RVA: 0x00268274 File Offset: 0x00266474
|
||||
[Token(Token = "0x600B12F")]
|
||||
[Address(RVA = "0x1896BC0", Offset = "0x18959C0", VA = "0x181896BC0", Slot = "15")]
|
||||
public virtual byte[] GenerateSignature()
|
||||
{
|
||||
/*
|
||||
An exception occurred when decompiling this method (0600B12F)
|
||||
|
||||
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.GenericSigner::GenerateSignature()
|
||||
|
||||
---> System.Exception: Basic block has to end with unconditional control flow.
|
||||
{
|
||||
IL_2E:
|
||||
stloc:InvalidOperationException(var_7_38, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("GenericSigner not initialised for signature generation.")))
|
||||
}
|
||||
|
||||
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: 0x0600B130 RID: 45360 RVA: 0x002682BC File Offset: 0x002664BC
|
||||
[Token(Token = "0x600B130")]
|
||||
[Address(RVA = "0x1896FF0", Offset = "0x1895DF0", VA = "0x181896FF0", Slot = "16")]
|
||||
public virtual bool VerifySignature(byte[] signature)
|
||||
{
|
||||
if (!this.forSigning)
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
byte[] array = new byte[0];
|
||||
IDigest digest2 = this.digest;
|
||||
IAsymmetricBlockCipher asymmetricBlockCipher = this.engine;
|
||||
int length = signature.Length;
|
||||
int length2 = array.Length;
|
||||
int num = new byte[length2].Length;
|
||||
num -= length2;
|
||||
}
|
||||
InvalidOperationException ex = new InvalidOperationException("GenericSigner not initialised for verification");
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x0600B131 RID: 45361 RVA: 0x00268348 File Offset: 0x00266548
|
||||
[Token(Token = "0x600B131")]
|
||||
[Address(RVA = "0x1896F40", Offset = "0x1895D40", VA = "0x181896F40", Slot = "17")]
|
||||
public virtual void Reset()
|
||||
{
|
||||
IDigest digest = this.digest;
|
||||
throw new NullReferenceException();
|
||||
}
|
||||
|
||||
// Token: 0x040070C5 RID: 28869
|
||||
[FieldOffset(Offset = "0x10")]
|
||||
[Token(Token = "0x40070C5")]
|
||||
private readonly IAsymmetricBlockCipher engine;
|
||||
|
||||
// Token: 0x040070C6 RID: 28870
|
||||
[FieldOffset(Offset = "0x18")]
|
||||
[Token(Token = "0x40070C6")]
|
||||
private readonly IDigest digest;
|
||||
|
||||
// Token: 0x040070C7 RID: 28871
|
||||
[FieldOffset(Offset = "0x20")]
|
||||
[Token(Token = "0x40070C7")]
|
||||
private bool forSigning;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user