191 lines
10 KiB
C#
191 lines
10 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers
|
|
{
|
|
// Token: 0x020015C4 RID: 5572
|
|
[Token(Token = "0x20015C4")]
|
|
[StructLayout(3)]
|
|
public class DsaDigestSigner : ISigner
|
|
{
|
|
// Token: 0x060094E2 RID: 38114 RVA: 0x0020ED78 File Offset: 0x0020CF78
|
|
[Token(Token = "0x60094E2")]
|
|
[Address(RVA = "0x1E3ACB0", Offset = "0x1E396B0", VA = "0x181E3ACB0")]
|
|
public DsaDigestSigner(IDsa dsa, IDigest digest)
|
|
{
|
|
this.dsa = dsa;
|
|
this.digest = digest;
|
|
this.encoding = typeof(StandardDsaEncoding).TypeHandle;
|
|
}
|
|
|
|
// Token: 0x060094E3 RID: 38115 RVA: 0x0020EDA4 File Offset: 0x0020CFA4
|
|
[Token(Token = "0x60094E3")]
|
|
[Address(RVA = "0x74BD80", Offset = "0x74A780", VA = "0x18074BD80")]
|
|
public DsaDigestSigner(IDsaExt dsa, IDigest digest, IDsaEncoding encoding)
|
|
{
|
|
this.dsa = dsa;
|
|
this.digest = digest;
|
|
this.encoding = encoding;
|
|
}
|
|
|
|
// Token: 0x170017D4 RID: 6100
|
|
// (get) Token: 0x060094E4 RID: 38116 RVA: 0x0020EDCC File Offset: 0x0020CFCC
|
|
[Token(Token = "0x170017D4")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x60094E4")]
|
|
[Address(RVA = "0x1E3AD40", Offset = "0x1E39740", VA = "0x181E3AD40", Slot = "11")]
|
|
get
|
|
{
|
|
IDigest digest = this.digest;
|
|
IDsa dsa = this.dsa;
|
|
string text;
|
|
return text;
|
|
}
|
|
}
|
|
|
|
// Token: 0x060094E5 RID: 38117 RVA: 0x0020EDF0 File Offset: 0x0020CFF0
|
|
[Token(Token = "0x60094E5")]
|
|
[Address(RVA = "0x1E3A7B0", Offset = "0x1E391B0", VA = "0x181E3A7B0", Slot = "12")]
|
|
public virtual void Init(bool forSigning, ICipherParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060094E5)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.DsaDigestSigner::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: 0x060094E6 RID: 38118 RVA: 0x0020EE60 File Offset: 0x0020D060
|
|
[Token(Token = "0x60094E6")]
|
|
[Address(RVA = "0x1E3AA80", Offset = "0x1E39480", VA = "0x181E3AA80", Slot = "13")]
|
|
public virtual void Update(byte input)
|
|
{
|
|
IDigest digest = this.digest;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x060094E7 RID: 38119 RVA: 0x0020EE7C File Offset: 0x0020D07C
|
|
[Token(Token = "0x60094E7")]
|
|
[Address(RVA = "0x1E3A490", Offset = "0x1E38E90", VA = "0x181E3A490", Slot = "14")]
|
|
public virtual void BlockUpdate(byte[] input, int inOff, int length)
|
|
{
|
|
IDigest digest = this.digest;
|
|
}
|
|
|
|
// Token: 0x060094E8 RID: 38120 RVA: 0x0020EE98 File Offset: 0x0020D098
|
|
[Token(Token = "0x60094E8")]
|
|
[Address(RVA = "0x1E3A510", Offset = "0x1E38F10", VA = "0x181E3A510", Slot = "15")]
|
|
public virtual byte[] GenerateSignature()
|
|
{
|
|
if (this.forSigning)
|
|
{
|
|
IDigest digest = this.digest;
|
|
byte[] array = new byte[0];
|
|
IDigest digest2 = this.digest;
|
|
IDsa dsa = this.dsa;
|
|
IDsaEncoding dsaEncoding = this.encoding;
|
|
this.Reset();
|
|
int length = array.Length;
|
|
byte b = array[0];
|
|
return array[1];
|
|
}
|
|
InvalidOperationException ex = new InvalidOperationException("DSADigestSigner not initialised for signature generation.");
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
|
|
// Token: 0x060094E9 RID: 38121 RVA: 0x0020EF24 File Offset: 0x0020D124
|
|
[Token(Token = "0x60094E9")]
|
|
[Address(RVA = "0x1E3AAE0", Offset = "0x1E394E0", VA = "0x181E3AAE0", Slot = "16")]
|
|
public virtual bool VerifySignature(byte[] signature)
|
|
{
|
|
if (!this.forSigning)
|
|
{
|
|
IDigest digest = this.digest;
|
|
byte[] array = new byte[0];
|
|
IDigest digest2 = this.digest;
|
|
IDsaEncoding dsaEncoding = this.encoding;
|
|
this.Reset();
|
|
IDsa dsa = this.dsa;
|
|
}
|
|
InvalidOperationException ex = new InvalidOperationException("DSADigestSigner not initialised for verification");
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
|
|
// Token: 0x060094EA RID: 38122 RVA: 0x0020EF9C File Offset: 0x0020D19C
|
|
[Token(Token = "0x60094EA")]
|
|
[Address(RVA = "0x1E3AA30", Offset = "0x1E39430", VA = "0x181E3AA30", Slot = "17")]
|
|
public virtual void Reset()
|
|
{
|
|
IDigest digest = this.digest;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x060094EB RID: 38123 RVA: 0x0020EFB8 File Offset: 0x0020D1B8
|
|
[Token(Token = "0x60094EB")]
|
|
[Address(RVA = "0x1E3A6F0", Offset = "0x1E390F0", VA = "0x181E3A6F0", Slot = "18")]
|
|
protected virtual BigInteger GetOrder()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060094EB)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.DsaDigestSigner::GetOrder()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:IDsa(var_0_06, ldfld:IDsa(DsaDigestSigner::dsa, ldloc:DsaDigestSigner(this)))
|
|
}
|
|
|
|
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: 0x04006255 RID: 25173
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006255")]
|
|
private readonly IDsa dsa;
|
|
|
|
// Token: 0x04006256 RID: 25174
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006256")]
|
|
private readonly IDigest digest;
|
|
|
|
// Token: 0x04006257 RID: 25175
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006257")]
|
|
private readonly IDsaEncoding encoding;
|
|
|
|
// Token: 0x04006258 RID: 25176
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4006258")]
|
|
private bool forSigning;
|
|
}
|
|
}
|