92 lines
4.9 KiB
C#
92 lines
4.9 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Security;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers
|
|
{
|
|
// Token: 0x020015DC RID: 5596
|
|
[Token(Token = "0x20015DC")]
|
|
[StructLayout(3)]
|
|
public class RandomDsaKCalculator : IDsaKCalculator
|
|
{
|
|
// Token: 0x170017EB RID: 6123
|
|
// (get) Token: 0x060095A4 RID: 38308 RVA: 0x00212D3C File Offset: 0x00210F3C
|
|
[Token(Token = "0x170017EB")]
|
|
public virtual bool IsDeterministic
|
|
{
|
|
[Token(Token = "0x60095A4")]
|
|
[Address(RVA = "0x413970", Offset = "0x412370", VA = "0x180413970", Slot = "8")]
|
|
get
|
|
{
|
|
}
|
|
}
|
|
|
|
// Token: 0x060095A5 RID: 38309 RVA: 0x00212D4C File Offset: 0x00210F4C
|
|
[Token(Token = "0x60095A5")]
|
|
[Address(RVA = "0xB90BA0", Offset = "0xB8F5A0", VA = "0x180B90BA0", Slot = "9")]
|
|
public virtual void Init(BigInteger n, SecureRandom random)
|
|
{
|
|
this.q = n;
|
|
this.random = random;
|
|
}
|
|
|
|
// Token: 0x060095A6 RID: 38310 RVA: 0x00212D68 File Offset: 0x00210F68
|
|
[Token(Token = "0x60095A6")]
|
|
[Address(RVA = "0x1E48E30", Offset = "0x1E47830", VA = "0x181E48E30", Slot = "10")]
|
|
public virtual void Init(BigInteger n, BigInteger d, byte[] message)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (060095A6)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Signers.RandomDsaKCalculator::Init(BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,BestHTTP.SecureProtocol.Org.BouncyCastle.Math.BigInteger,System.Byte[])
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:InvalidOperationException(var_0_0A, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Operation not supported")))
|
|
}
|
|
|
|
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: 0x060095A7 RID: 38311 RVA: 0x00212D80 File Offset: 0x00210F80
|
|
[Token(Token = "0x60095A7")]
|
|
[Address(RVA = "0x1E48E90", Offset = "0x1E47890", VA = "0x181E48E90", Slot = "11")]
|
|
public virtual BigInteger NextK()
|
|
{
|
|
int bitLength = this.q.BitLength;
|
|
SecureRandom secureRandom = this.random;
|
|
BigInteger bigInteger = new BigInteger(bitLength, secureRandom);
|
|
BigInteger bigInteger2 = this.q;
|
|
int num = bigInteger.CompareTo(bigInteger2);
|
|
return bigInteger;
|
|
}
|
|
|
|
// Token: 0x060095A8 RID: 38312 RVA: 0x00212DC0 File Offset: 0x00210FC0
|
|
[Token(Token = "0x60095A8")]
|
|
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
|
|
public RandomDsaKCalculator()
|
|
{
|
|
}
|
|
|
|
// Token: 0x040062D1 RID: 25297
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40062D1")]
|
|
private BigInteger q;
|
|
|
|
// Token: 0x040062D2 RID: 25298
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40062D2")]
|
|
private SecureRandom random;
|
|
}
|
|
}
|