195 lines
10 KiB
C#
195 lines
10 KiB
C#
using System;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro
|
|
{
|
|
// Token: 0x02001FE0 RID: 8160
|
|
[Token(Token = "0x2001FE0")]
|
|
public class Gost3410ParamSetParameters : Asn1Encodable
|
|
{
|
|
// Token: 0x0600CC3E RID: 52286 RVA: 0x002E7208 File Offset: 0x002E5408
|
|
[Token(Token = "0x600CC3E")]
|
|
[Address(RVA = "0x23B6C90", Offset = "0x23B5C90", VA = "0x1823B6C90")]
|
|
public static Gost3410ParamSetParameters GetInstance(Asn1TaggedObject obj, bool explicitly)
|
|
{
|
|
return Gost3410ParamSetParameters.GetInstance(Asn1Sequence.GetInstance(obj, explicitly));
|
|
}
|
|
|
|
// Token: 0x0600CC3F RID: 52287 RVA: 0x002E7224 File Offset: 0x002E5424
|
|
[Token(Token = "0x600CC3F")]
|
|
[Address(RVA = "0x23B6CB0", Offset = "0x23B5CB0", VA = "0x1823B6CB0")]
|
|
public static Gost3410ParamSetParameters GetInstance(object obj)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CC3F)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro.Gost3410ParamSetParameters BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro.Gost3410ParamSetParameters::GetInstance(System.Object)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_26:
|
|
stloc:string(var_6_2C, call:string(Platform::GetTypeName, ldloc:object(obj)))
|
|
stloc:ArgumentException(var_7_3F, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("Invalid GOST3410Parameter: "), ldloc:string(var_6_2C))))
|
|
}
|
|
|
|
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: 0x0600CC40 RID: 52288 RVA: 0x002E7274 File Offset: 0x002E5474
|
|
[Token(Token = "0x600CC40")]
|
|
[Address(RVA = "0x23B7090", Offset = "0x23B6090", VA = "0x1823B7090")]
|
|
public Gost3410ParamSetParameters(int keySize, BigInteger p, BigInteger q, BigInteger a)
|
|
{
|
|
this.keySize = keySize;
|
|
DerInteger derInteger = new DerInteger(p);
|
|
this.p = derInteger;
|
|
DerInteger derInteger2 = new DerInteger(q);
|
|
this.q = derInteger2;
|
|
DerInteger derInteger3;
|
|
this.a = derInteger3;
|
|
}
|
|
|
|
// Token: 0x0600CC41 RID: 52289 RVA: 0x002E72B4 File Offset: 0x002E54B4
|
|
[Token(Token = "0x600CC41")]
|
|
[Address(RVA = "0x23B7160", Offset = "0x23B6160", VA = "0x1823B7160")]
|
|
private Gost3410ParamSetParameters(Asn1Sequence seq)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600CC41)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.CryptoPro.Gost3410ParamSetParameters::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Sequence)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_62:
|
|
stloc:ArgumentException(var_10_71, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Wrong number of elements in sequence"), ldstr:string("seq")))
|
|
}
|
|
|
|
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: 0x17001FFC RID: 8188
|
|
// (get) Token: 0x0600CC42 RID: 52290 RVA: 0x002E7334 File Offset: 0x002E5534
|
|
[Token(Token = "0x17001FFC")]
|
|
public int KeySize
|
|
{
|
|
[Token(Token = "0x600CC42")]
|
|
[Address(RVA = "0x40F000", Offset = "0x40E000", VA = "0x18040F000")]
|
|
get
|
|
{
|
|
return this.keySize;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001FFD RID: 8189
|
|
// (get) Token: 0x0600CC43 RID: 52291 RVA: 0x002E7348 File Offset: 0x002E5548
|
|
[Token(Token = "0x17001FFD")]
|
|
public BigInteger P
|
|
{
|
|
[Token(Token = "0x600CC43")]
|
|
[Address(RVA = "0x23B4F10", Offset = "0x23B3F10", VA = "0x1823B4F10")]
|
|
get
|
|
{
|
|
byte[] bytes = this.p.bytes;
|
|
return new BigInteger(1, bytes);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001FFE RID: 8190
|
|
// (get) Token: 0x0600CC44 RID: 52292 RVA: 0x002E7370 File Offset: 0x002E5570
|
|
[Token(Token = "0x17001FFE")]
|
|
public BigInteger Q
|
|
{
|
|
[Token(Token = "0x600CC44")]
|
|
[Address(RVA = "0x23B4E30", Offset = "0x23B3E30", VA = "0x1823B4E30")]
|
|
get
|
|
{
|
|
byte[] bytes = this.q.bytes;
|
|
return new BigInteger(1, bytes);
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001FFF RID: 8191
|
|
// (get) Token: 0x0600CC45 RID: 52293 RVA: 0x002E7398 File Offset: 0x002E5598
|
|
[Token(Token = "0x17001FFF")]
|
|
public BigInteger A
|
|
{
|
|
[Token(Token = "0x600CC45")]
|
|
[Address(RVA = "0x23B7310", Offset = "0x23B6310", VA = "0x1823B7310")]
|
|
get
|
|
{
|
|
byte[] bytes = this.a.bytes;
|
|
return new BigInteger(1, bytes);
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600CC46 RID: 52294 RVA: 0x002E73C0 File Offset: 0x002E55C0
|
|
[Token(Token = "0x600CC46")]
|
|
[Address(RVA = "0x23B6EA0", Offset = "0x23B5EA0", VA = "0x1823B6EA0", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
Asn1Encodable[] array = new Asn1Encodable[4];
|
|
DerInteger derInteger = new DerInteger(this.keySize);
|
|
if (derInteger != 0)
|
|
{
|
|
}
|
|
array[0] = derInteger;
|
|
DerInteger derInteger2 = this.p;
|
|
if (derInteger2 != 0)
|
|
{
|
|
}
|
|
array[1] = derInteger2;
|
|
DerInteger derInteger3 = this.q;
|
|
if (derInteger3 != 0)
|
|
{
|
|
}
|
|
array[2] = derInteger3;
|
|
DerInteger derInteger4 = this.a;
|
|
if (derInteger4 != 0)
|
|
{
|
|
}
|
|
array[3] = derInteger4;
|
|
DerSequence derSequence = new DerSequence(array);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x040081AC RID: 33196
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x40081AC")]
|
|
private readonly int keySize;
|
|
|
|
// Token: 0x040081AD RID: 33197
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x40081AD")]
|
|
private readonly DerInteger p;
|
|
|
|
// Token: 0x040081AE RID: 33198
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x40081AE")]
|
|
private readonly DerInteger q;
|
|
|
|
// Token: 0x040081AF RID: 33199
|
|
[FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x40081AF")]
|
|
private readonly DerInteger a;
|
|
}
|
|
}
|