189 lines
10 KiB
C#
189 lines
10 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers
|
|
{
|
|
// Token: 0x02001C81 RID: 7297
|
|
[Token(Token = "0x2001C81")]
|
|
public class DsaDigestSigner : ISigner
|
|
{
|
|
// Token: 0x0600B48A RID: 46218 RVA: 0x0026F5CC File Offset: 0x0026D7CC
|
|
[Token(Token = "0x600B48A")]
|
|
[Address(RVA = "0x2355EF0", Offset = "0x2354EF0", VA = "0x182355EF0")]
|
|
public DsaDigestSigner(IDsa dsa, IDigest digest)
|
|
{
|
|
this.dsa = dsa;
|
|
this.digest = digest;
|
|
this.encoding = typeof(StandardDsaEncoding).TypeHandle;
|
|
}
|
|
|
|
// Token: 0x0600B48B RID: 46219 RVA: 0x0026F5F8 File Offset: 0x0026D7F8
|
|
[Token(Token = "0x600B48B")]
|
|
[Address(RVA = "0x466000", Offset = "0x465000", VA = "0x180466000")]
|
|
public DsaDigestSigner(IDsaExt dsa, IDigest digest, IDsaEncoding encoding)
|
|
{
|
|
this.dsa = dsa;
|
|
this.digest = digest;
|
|
this.encoding = encoding;
|
|
}
|
|
|
|
// Token: 0x17001C72 RID: 7282
|
|
// (get) Token: 0x0600B48C RID: 46220 RVA: 0x0026F620 File Offset: 0x0026D820
|
|
[Token(Token = "0x17001C72")]
|
|
public virtual string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600B48C")]
|
|
[Address(RVA = "0x2355F80", Offset = "0x2354F80", VA = "0x182355F80", Slot = "11")]
|
|
get
|
|
{
|
|
IDigest digest = this.digest;
|
|
IDsa dsa = this.dsa;
|
|
string text;
|
|
return text;
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600B48D RID: 46221 RVA: 0x0026F644 File Offset: 0x0026D844
|
|
[Token(Token = "0x600B48D")]
|
|
[Address(RVA = "0x23559F0", Offset = "0x23549F0", VA = "0x1823559F0", Slot = "12")]
|
|
public virtual void Init(bool forSigning, ICipherParameters parameters)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B48D)
|
|
|
|
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: 0x0600B48E RID: 46222 RVA: 0x0026F6B4 File Offset: 0x0026D8B4
|
|
[Token(Token = "0x600B48E")]
|
|
[Address(RVA = "0x2355CC0", Offset = "0x2354CC0", VA = "0x182355CC0", Slot = "13")]
|
|
public virtual void Update(byte input)
|
|
{
|
|
IDigest digest = this.digest;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600B48F RID: 46223 RVA: 0x0026F6D0 File Offset: 0x0026D8D0
|
|
[Token(Token = "0x600B48F")]
|
|
[Address(RVA = "0x23556D0", Offset = "0x23546D0", VA = "0x1823556D0", Slot = "14")]
|
|
public virtual void BlockUpdate(byte[] input, int inOff, int length)
|
|
{
|
|
IDigest digest = this.digest;
|
|
}
|
|
|
|
// Token: 0x0600B490 RID: 46224 RVA: 0x0026F6EC File Offset: 0x0026D8EC
|
|
[Token(Token = "0x600B490")]
|
|
[Address(RVA = "0x2355750", Offset = "0x2354750", VA = "0x182355750", 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: 0x0600B491 RID: 46225 RVA: 0x0026F778 File Offset: 0x0026D978
|
|
[Token(Token = "0x600B491")]
|
|
[Address(RVA = "0x2355D20", Offset = "0x2354D20", VA = "0x182355D20", 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: 0x0600B492 RID: 46226 RVA: 0x0026F7F0 File Offset: 0x0026D9F0
|
|
[Token(Token = "0x600B492")]
|
|
[Address(RVA = "0x2355C70", Offset = "0x2354C70", VA = "0x182355C70", Slot = "17")]
|
|
public virtual void Reset()
|
|
{
|
|
IDigest digest = this.digest;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600B493 RID: 46227 RVA: 0x0026F80C File Offset: 0x0026DA0C
|
|
[Token(Token = "0x600B493")]
|
|
[Address(RVA = "0x2355930", Offset = "0x2354930", VA = "0x182355930", Slot = "18")]
|
|
protected virtual BigInteger GetOrder()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600B493)
|
|
|
|
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: 0x04007251 RID: 29265
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007251")]
|
|
private readonly IDsa dsa;
|
|
|
|
// Token: 0x04007252 RID: 29266
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007252")]
|
|
private readonly IDigest digest;
|
|
|
|
// Token: 0x04007253 RID: 29267
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007253")]
|
|
private readonly IDsaEncoding encoding;
|
|
|
|
// Token: 0x04007254 RID: 29268
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4007254")]
|
|
private bool forSigning;
|
|
}
|
|
}
|