148 lines
6.4 KiB
C#
148 lines
6.4 KiB
C#
using System;
|
|
using System.IO;
|
|
using System.Threading;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC.Multiplier;
|
|
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9
|
|
{
|
|
// Token: 0x02001EC7 RID: 7879
|
|
[Token(Token = "0x2001EC7")]
|
|
public class X9ECPoint : Asn1Encodable
|
|
{
|
|
// Token: 0x0600C569 RID: 50537 RVA: 0x002C9398 File Offset: 0x002C7598
|
|
[Token(Token = "0x600C569")]
|
|
[Address(RVA = "0x2154850", Offset = "0x2153850", VA = "0x182154850")]
|
|
public X9ECPoint(ECPoint p)
|
|
{
|
|
bool flag = p.IsNormalized();
|
|
this.p = flag;
|
|
byte[] array;
|
|
DerOctetString derOctetString = new DerOctetString(array);
|
|
this.encoding = derOctetString;
|
|
}
|
|
|
|
// Token: 0x0600C56A RID: 50538 RVA: 0x002C93D0 File Offset: 0x002C75D0
|
|
[Token(Token = "0x600C56A")]
|
|
[Address(RVA = "0x2154900", Offset = "0x2153900", VA = "0x182154900")]
|
|
public X9ECPoint(ECPoint p, bool compressed)
|
|
{
|
|
bool flag = p.IsNormalized();
|
|
this.p = flag;
|
|
byte[] array;
|
|
DerOctetString derOctetString = new DerOctetString(array);
|
|
this.encoding = derOctetString;
|
|
}
|
|
|
|
// Token: 0x0600C56B RID: 50539 RVA: 0x002C9408 File Offset: 0x002C7608
|
|
[Token(Token = "0x600C56B")]
|
|
[Address(RVA = "0x21549B0", Offset = "0x21539B0", VA = "0x1821549B0")]
|
|
public X9ECPoint(ECCurve c, byte[] encoding)
|
|
{
|
|
this.c = c;
|
|
DerOctetString derOctetString = new DerOctetString(Arrays.Clone(encoding));
|
|
this.encoding = derOctetString;
|
|
}
|
|
|
|
// Token: 0x0600C56C RID: 50540 RVA: 0x002C9438 File Offset: 0x002C7638
|
|
[Token(Token = "0x600C56C")]
|
|
[Address(RVA = "0x2154800", Offset = "0x2153800", VA = "0x182154800")]
|
|
public X9ECPoint(ECCurve c, Asn1OctetString s)
|
|
{
|
|
Stream octetStream = s.GetOctetStream();
|
|
}
|
|
|
|
// Token: 0x0600C56D RID: 50541 RVA: 0x002C9454 File Offset: 0x002C7654
|
|
[Token(Token = "0x600C56D")]
|
|
[Address(RVA = "0x2154780", Offset = "0x2153780", VA = "0x182154780")]
|
|
public byte[] GetPointEncoding()
|
|
{
|
|
Stream octetStream = this.encoding.GetOctetStream();
|
|
byte[] array;
|
|
return array;
|
|
}
|
|
|
|
// Token: 0x17001E75 RID: 7797
|
|
// (get) Token: 0x0600C56E RID: 50542 RVA: 0x002C9474 File Offset: 0x002C7674
|
|
[Token(Token = "0x17001E75")]
|
|
public ECPoint Point
|
|
{
|
|
[Token(Token = "0x600C56E")]
|
|
[Address(RVA = "0x2154AC0", Offset = "0x2153AC0", VA = "0x182154AC0")]
|
|
get
|
|
{
|
|
ECPoint ecpoint = this.p;
|
|
if (ecpoint == 0)
|
|
{
|
|
ECCurve eccurve = this.c;
|
|
Stream octetStream = this.encoding.GetOctetStream();
|
|
ECMultiplier multiplier = eccurve.GetMultiplier();
|
|
}
|
|
return ecpoint;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001E76 RID: 7798
|
|
// (get) Token: 0x0600C56F RID: 50543 RVA: 0x002C94B0 File Offset: 0x002C76B0
|
|
[Token(Token = "0x17001E76")]
|
|
public bool IsPointCompressed
|
|
{
|
|
[Token(Token = "0x600C56F")]
|
|
[Address(RVA = "0x2154A50", Offset = "0x2153A50", VA = "0x182154A50")]
|
|
get
|
|
{
|
|
Stream octetStream = this.encoding.GetOctetStream();
|
|
if (octetStream != 0 && octetStream._activeReadWriteTask != 0)
|
|
{
|
|
SemaphoreSlim asyncActiveSemaphore = octetStream._asyncActiveSemaphore;
|
|
return asyncActiveSemaphore == (ulong)2L || asyncActiveSemaphore == (ulong)3L;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600C570 RID: 50544 RVA: 0x002C94F4 File Offset: 0x002C76F4
|
|
[Token(Token = "0x600C570")]
|
|
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530", Slot = "5")]
|
|
public override Asn1Object ToAsn1Object()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600C570)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.Asn1Object BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9.X9ECPoint::ToAsn1Object()
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:Asn1OctetString(var_0_06, ldfld:Asn1OctetString(X9ECPoint::encoding, ldloc:X9ECPoint(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: 0x04007BC2 RID: 31682
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4007BC2")]
|
|
private readonly Asn1OctetString encoding;
|
|
|
|
// Token: 0x04007BC3 RID: 31683
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4007BC3")]
|
|
private ECCurve c;
|
|
|
|
// Token: 0x04007BC4 RID: 31684
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4007BC4")]
|
|
private ECPoint p;
|
|
}
|
|
}
|