208 lines
13 KiB
C#
208 lines
13 KiB
C#
using System;
|
|
using Cpp2IlInjected;
|
|
|
|
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto
|
|
{
|
|
// Token: 0x02001AC5 RID: 6853
|
|
[Token(Token = "0x2001AC5")]
|
|
public class BufferedAsymmetricBlockCipher : BufferedCipherBase
|
|
{
|
|
// Token: 0x0600AA4F RID: 43599 RVA: 0x00254304 File Offset: 0x00252504
|
|
[Token(Token = "0x600AA4F")]
|
|
[Address(RVA = "0x1B33230", Offset = "0x1B32030", VA = "0x181B33230")]
|
|
public BufferedAsymmetricBlockCipher(IAsymmetricBlockCipher cipher)
|
|
{
|
|
this.cipher = cipher;
|
|
}
|
|
|
|
// Token: 0x0600AA50 RID: 43600 RVA: 0x00254320 File Offset: 0x00252520
|
|
[Token(Token = "0x600AA50")]
|
|
[Address(RVA = "0x3F7310", Offset = "0x3F6110", VA = "0x1803F7310")]
|
|
internal int GetBufferPosition()
|
|
{
|
|
return this.bufOff;
|
|
}
|
|
|
|
// Token: 0x17001B13 RID: 6931
|
|
// (get) Token: 0x0600AA51 RID: 43601 RVA: 0x00254334 File Offset: 0x00252534
|
|
[Token(Token = "0x17001B13")]
|
|
public override string AlgorithmName
|
|
{
|
|
[Token(Token = "0x600AA51")]
|
|
[Address(RVA = "0x1B332A0", Offset = "0x1B320A0", VA = "0x181B332A0", Slot = "22")]
|
|
get
|
|
{
|
|
IAsymmetricBlockCipher asymmetricBlockCipher = this.cipher;
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600AA52 RID: 43602 RVA: 0x00254350 File Offset: 0x00252550
|
|
[Token(Token = "0x600AA52")]
|
|
[Address(RVA = "0x1B32EF0", Offset = "0x1B31CF0", VA = "0x181B32EF0", Slot = "24")]
|
|
public override int GetBlockSize()
|
|
{
|
|
IAsymmetricBlockCipher asymmetricBlockCipher = this.cipher;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600AA53 RID: 43603 RVA: 0x0025436C File Offset: 0x0025256C
|
|
[Token(Token = "0x600AA53")]
|
|
[Address(RVA = "0x1B32F40", Offset = "0x1B31D40", VA = "0x181B32F40", Slot = "25")]
|
|
public override int GetOutputSize(int length)
|
|
{
|
|
IAsymmetricBlockCipher asymmetricBlockCipher = this.cipher;
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600AA54 RID: 43604 RVA: 0x00254388 File Offset: 0x00252588
|
|
[Token(Token = "0x600AA54")]
|
|
[Address(RVA = "0x43E630", Offset = "0x43D430", VA = "0x18043E630", Slot = "26")]
|
|
public override int GetUpdateOutputSize(int length)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
// Token: 0x0600AA55 RID: 43605 RVA: 0x00254398 File Offset: 0x00252598
|
|
[Token(Token = "0x600AA55")]
|
|
[Address(RVA = "0x1B32F90", Offset = "0x1B31D90", VA = "0x181B32F90", Slot = "23")]
|
|
public override void Init(bool forEncryption, ICipherParameters parameters)
|
|
{
|
|
IAsymmetricBlockCipher asymmetricBlockCipher = this.cipher;
|
|
IAsymmetricBlockCipher asymmetricBlockCipher2 = this.cipher;
|
|
byte[] array = new byte[forEncryption ? 1 : 0];
|
|
this.buffer = array;
|
|
this.bufOff = (int)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x0600AA56 RID: 43606 RVA: 0x002543D0 File Offset: 0x002525D0
|
|
[Token(Token = "0x600AA56")]
|
|
[Address(RVA = "0x1B33050", Offset = "0x1B31E50", VA = "0x181B33050", Slot = "27")]
|
|
public override byte[] ProcessByte(byte input)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AA56)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.BufferedAsymmetricBlockCipher::ProcessByte(System.Byte)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_2A:
|
|
stloc:DataLengthException(var_4_34, newobj:DataLengthException(DataLengthException::.ctor, ldstr:string("attempt to process message to long for cipher")))
|
|
}
|
|
|
|
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: 0x0600AA57 RID: 43607 RVA: 0x00254414 File Offset: 0x00252614
|
|
[Token(Token = "0x600AA57")]
|
|
[Address(RVA = "0x1B33100", Offset = "0x1B31F00", VA = "0x181B33100", Slot = "30")]
|
|
public override byte[] ProcessBytes(byte[] input, int inOff, int length)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AA57)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.BufferedAsymmetricBlockCipher::ProcessBytes(System.Byte[],System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
IL_1E:
|
|
stloc:ArgumentNullException(var_4_28, newobj:ArgumentNullException(ArgumentNullException::.ctor, ldstr:string("input")))
|
|
}
|
|
|
|
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: 0x0600AA58 RID: 43608 RVA: 0x0025444C File Offset: 0x0025264C
|
|
[Token(Token = "0x600AA58")]
|
|
[Address(RVA = "0x1B32D80", Offset = "0x1B31B80", VA = "0x181B32D80", Slot = "33")]
|
|
public override byte[] DoFinal()
|
|
{
|
|
if (this.bufOff > 0)
|
|
{
|
|
IAsymmetricBlockCipher asymmetricBlockCipher = this.cipher;
|
|
byte[] array = this.buffer;
|
|
int num = 0;
|
|
num += num;
|
|
num++;
|
|
array += array;
|
|
}
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600AA59 RID: 43609 RVA: 0x00254484 File Offset: 0x00252684
|
|
[Token(Token = "0x600AA59")]
|
|
[Address(RVA = "0x1B32EB0", Offset = "0x1B31CB0", VA = "0x181B32EB0", Slot = "35")]
|
|
public override byte[] DoFinal(byte[] input, int inOff, int length)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600AA59)
|
|
|
|
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.BufferedAsymmetricBlockCipher::DoFinal(System.Byte[],System.Int32,System.Int32)
|
|
|
|
---> System.Exception: Basic block has to end with unconditional control flow.
|
|
{
|
|
Block_0:
|
|
stloc:uint8[](var_0_07, callvirt:uint8[](BufferedCipherBase::ProcessBytes, ldloc:BufferedAsymmetricBlockCipher[exp:BufferedCipherBase](this), ldloc:uint8[](input)))
|
|
stloc:string(var_1_0E, callgetter:string(BufferedCipherBase::get_AlgorithmName, ldloc:BufferedAsymmetricBlockCipher[exp:BufferedCipherBase](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: 0x0600AA5A RID: 43610 RVA: 0x002544A0 File Offset: 0x002526A0
|
|
[Token(Token = "0x600AA5A")]
|
|
[Address(RVA = "0x1B33200", Offset = "0x1B32000", VA = "0x181B33200", Slot = "39")]
|
|
public override void Reset()
|
|
{
|
|
byte[] array = this.buffer;
|
|
if (array != 0)
|
|
{
|
|
int length = array.Length;
|
|
int num = 0;
|
|
Array.Clear(array, num, length);
|
|
this.bufOff = (int)((ulong)0L);
|
|
}
|
|
}
|
|
|
|
// Token: 0x04006C97 RID: 27799
|
|
[FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006C97")]
|
|
private readonly IAsymmetricBlockCipher cipher;
|
|
|
|
// Token: 0x04006C98 RID: 27800
|
|
[FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006C98")]
|
|
private byte[] buffer;
|
|
|
|
// Token: 0x04006C99 RID: 27801
|
|
[FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006C99")]
|
|
private int bufOff;
|
|
}
|
|
}
|