175 lines
9.8 KiB
C#
175 lines
9.8 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers
|
|
{
|
|
// Token: 0x020015D3 RID: 5587
|
|
[Token(Token = "0x20015D3")]
|
|
[StructLayout(3)]
|
|
public class GenericSigner : ISigner
|
|
{
|
|
// Token: 0x06009550 RID: 38224 RVA: 0x00210AA8 File Offset: 0x0020ECA8
|
|
[Token(Token = "0x6009550")]
|
|
[Address(RVA = "0x3C39C0", Offset = "0x3C23C0", VA = "0x1803C39C0")]
|
|
public GenericSigner(IAsymmetricBlockCipher engine, IDigest digest)
|
|
{
|
|
this.engine = engine;
|
|
this.digest = digest;
|
|
}
|
|
|
|
// Token: 0x170017E5 RID: 6117
|
|
// (get) Token: 0x06009551 RID: 38225 RVA: 0x00210ACC File Offset: 0x0020ECCC
|
|
[Token(Token = "0x170017E5")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x6009551")]
|
|
[Address(RVA = "0x1E3F950", Offset = "0x1E3E350", VA = "0x181E3F950", 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: 0x06009552 RID: 38226 RVA: 0x00210B60 File Offset: 0x0020ED60
|
|
[Token(Token = "0x6009552")]
|
|
[Address(RVA = "0x1E3F440", Offset = "0x1E3DE40", VA = "0x181E3F440", Slot = "12")]
|
|
public virtual void Init(bool forSigning, ICipherParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009552)
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009553 RID: 38227 RVA: 0x00210BD0 File Offset: 0x0020EDD0
|
|
[Token(Token = "0x6009553")]
|
|
[Address(RVA = "0x1E3F710", Offset = "0x1E3E110", VA = "0x181E3F710", Slot = "13")]
|
|
public virtual void Update(byte input)
|
|
{
|
|
IDigest digest = this.digest;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x06009554 RID: 38228 RVA: 0x00210BEC File Offset: 0x0020EDEC
|
|
[Token(Token = "0x6009554")]
|
|
[Address(RVA = "0x1E3F2C0", Offset = "0x1E3DCC0", VA = "0x181E3F2C0", Slot = "14")]
|
|
public virtual void BlockUpdate(byte[] input, int inOff, int length)
|
|
{
|
|
IDigest digest = this.digest;
|
|
}
|
|
|
|
// Token: 0x06009555 RID: 38229 RVA: 0x00210C08 File Offset: 0x0020EE08
|
|
[Token(Token = "0x6009555")]
|
|
[Address(RVA = "0x1E3F340", Offset = "0x1E3DD40", VA = "0x181E3F340", Slot = "15")]
|
|
public virtual byte[] GenerateSignature()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (06009555)
|
|
|
|
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 1663
|
|
*/;
|
|
}
|
|
|
|
// Token: 0x06009556 RID: 38230 RVA: 0x00210C50 File Offset: 0x0020EE50
|
|
[Token(Token = "0x6009556")]
|
|
[Address(RVA = "0x1E3F770", Offset = "0x1E3E170", VA = "0x181E3F770", 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: 0x06009557 RID: 38231 RVA: 0x00210CDC File Offset: 0x0020EEDC
|
|
[Token(Token = "0x6009557")]
|
|
[Address(RVA = "0x1E3F6C0", Offset = "0x1E3E0C0", VA = "0x181E3F6C0", Slot = "17")]
|
|
public virtual void Reset()
|
|
{
|
|
IDigest digest = this.digest;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x04006282 RID: 25218
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006282")]
|
|
private readonly IAsymmetricBlockCipher engine;
|
|
|
|
// Token: 0x04006283 RID: 25219
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006283")]
|
|
private readonly IDigest digest;
|
|
|
|
// Token: 0x04006284 RID: 25220
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006284")]
|
|
private bool forSigning;
|
|
}
|
|
}
|