This commit is contained in:
niko
2026-04-08 23:40:05 +02:00
parent d6894bcbc7
commit 18dc73f922
7750 changed files with 1795369 additions and 0 deletions
@@ -0,0 +1,224 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001655 RID: 5717
[Token(Token = "0x2001655")]
[StructLayout(3)]
public sealed class CbcBlockCipher : IBlockCipher
{
// Token: 0x06009843 RID: 38979 RVA: 0x0021BB08 File Offset: 0x00219D08
[Token(Token = "0x6009843")]
[Address(RVA = "0x20E5A90", Offset = "0x20E4490", VA = "0x1820E5A90")]
public CbcBlockCipher(IBlockCipher cipher)
{
this.cipher = cipher;
byte[] array = new byte[0];
int num = this.blockSize;
this.IV = array;
byte[] array2 = new byte[num];
int num2 = this.blockSize;
this.cbcV = array2;
byte[] array3 = new byte[num2];
this.cbcNextV = array3;
}
// Token: 0x06009844 RID: 38980 RVA: 0x0021BB64 File Offset: 0x00219D64
[Token(Token = "0x6009844")]
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x06009845 RID: 38981 RVA: 0x0021BB78 File Offset: 0x00219D78
[Token(Token = "0x6009845")]
[Address(RVA = "0x20E5520", Offset = "0x20E3F20", VA = "0x1820E5520", Slot = "5")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (06009845)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CbcBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_C0:
stloc:ArgumentException(var_20_CA, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("initialisation vector must be the same length as block size")))
}
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: 0x17001874 RID: 6260
// (get) Token: 0x06009846 RID: 38982 RVA: 0x0021BC50 File Offset: 0x00219E50
[Token(Token = "0x17001874")]
public string AlgorithmName
{
[Token(Token = "0x6009846")]
[Address(RVA = "0x20E5B30", Offset = "0x20E4530", VA = "0x1820E5B30", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/CBC";
}
}
// Token: 0x17001875 RID: 6261
// (get) Token: 0x06009847 RID: 38983 RVA: 0x0021BC78 File Offset: 0x00219E78
[Token(Token = "0x17001875")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x6009847")]
[Address(RVA = "0x413970", Offset = "0x412370", VA = "0x180413970", Slot = "7")]
get
{
}
}
// Token: 0x06009848 RID: 38984 RVA: 0x0021BC88 File Offset: 0x00219E88
[Token(Token = "0x6009848")]
[Address(RVA = "0x20E54D0", Offset = "0x20E3ED0", VA = "0x1820E54D0", Slot = "6")]
public int GetBlockSize()
{
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x06009849 RID: 38985 RVA: 0x0021BCA4 File Offset: 0x00219EA4
[Token(Token = "0x6009849")]
[Address(RVA = "0x20E5750", Offset = "0x20E4150", VA = "0x1820E5750", Slot = "8")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
if (this.encrypting)
{
int num = this.blockSize;
int num2 = 0;
if (num > 0)
{
byte[] array = this.cbcV;
num2 += array;
num2++;
}
IBlockCipher blockCipher = this.cipher;
int length = this.cbcV.Length;
return inOff;
}
int num3 = this.blockSize;
byte[] array2 = this.cbcNextV;
int num4 = 0;
int num5 = 0;
Array.Copy(input, inOff, array2, num5, num3);
IBlockCipher blockCipher2 = this.cipher;
if (this.blockSize > num4)
{
byte[] array3 = this.cbcV;
num4++;
}
byte[] array4 = this.cbcNextV;
byte[] array5 = this.cbcV;
this.cbcV = array4;
this.cbcNextV = array5;
throw new NullReferenceException();
}
// Token: 0x0600984A RID: 38986 RVA: 0x0021BD54 File Offset: 0x00219F54
[Token(Token = "0x600984A")]
[Address(RVA = "0x20E5A00", Offset = "0x20E4400", VA = "0x1820E5A00", Slot = "9")]
public void Reset()
{
byte[] iv = this.IV;
int length = iv.Length;
int num = 0;
byte[] array = this.cbcV;
int num2 = 0;
Array.Copy(iv, num2, array, num, length);
byte[] array2 = this.cbcNextV;
int length2 = array2.Length;
int num3 = 0;
Array.Clear(array2, num3, length2);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x0600984B RID: 38987 RVA: 0x0021BDB4 File Offset: 0x00219FB4
[Token(Token = "0x600984B")]
[Address(RVA = "0x20E5360", Offset = "0x20E3D60", VA = "0x1820E5360")]
private int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
int num = this.blockSize;
int num2 = 0;
if (num > 0)
{
byte[] array = this.cbcV;
num2 += array;
num2++;
}
IBlockCipher blockCipher = this.cipher;
int length = this.cbcV.Length;
return inOff;
}
// Token: 0x0600984C RID: 38988 RVA: 0x0021BDF8 File Offset: 0x00219FF8
[Token(Token = "0x600984C")]
[Address(RVA = "0x20E51F0", Offset = "0x20E3BF0", VA = "0x1820E51F0")]
private int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
int num = this.blockSize;
byte[] array = this.cbcNextV;
int num2 = 0;
int num3 = 0;
Array.Copy(input, inOff, array, num3, num);
IBlockCipher blockCipher = this.cipher;
if (this.blockSize > num2)
{
byte[] array2 = this.cbcV;
num2++;
}
byte[] array3 = this.cbcNextV;
byte[] array4 = this.cbcV;
this.cbcV = array3;
this.cbcNextV = array4;
throw new NullReferenceException();
}
// Token: 0x0400640B RID: 25611
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400640B")]
private byte[] IV;
// Token: 0x0400640C RID: 25612
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400640C")]
private byte[] cbcV;
// Token: 0x0400640D RID: 25613
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x400640D")]
private byte[] cbcNextV;
// Token: 0x0400640E RID: 25614
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x400640E")]
private int blockSize;
// Token: 0x0400640F RID: 25615
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x400640F")]
private IBlockCipher cipher;
// Token: 0x04006410 RID: 25616
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006410")]
private bool encrypting;
}
}
@@ -0,0 +1,387 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001656 RID: 5718
[Token(Token = "0x2001656")]
[StructLayout(3)]
public class CcmBlockCipher : IAeadBlockCipher
{
// Token: 0x0600984D RID: 38989 RVA: 0x0021BE64 File Offset: 0x0021A064
[Token(Token = "0x600984D")]
[Address(RVA = "0x20E7090", Offset = "0x20E5A90", VA = "0x1820E7090")]
public CcmBlockCipher(IBlockCipher cipher)
{
MemoryStream memoryStream = new MemoryStream();
this.associatedText = memoryStream;
MemoryStream memoryStream2 = new MemoryStream();
this.data = memoryStream2;
base..ctor();
this.cipher = cipher;
byte[] array = new byte[CcmBlockCipher.BlockSize];
this.macBlock = array;
}
// Token: 0x0600984E RID: 38990 RVA: 0x0021BEC4 File Offset: 0x0021A0C4
[Token(Token = "0x600984E")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "17")]
public virtual IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x0600984F RID: 38991 RVA: 0x0021BED8 File Offset: 0x0021A0D8
[Token(Token = "0x600984F")]
[Address(RVA = "0x20E6330", Offset = "0x20E4D30", VA = "0x1820E6330", Slot = "18")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (0600984F)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_78:
stloc:ArgumentException(var_11_82, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("invalid parameters passed to CCM")))
}
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: 0x17001876 RID: 6262
// (get) Token: 0x06009850 RID: 38992 RVA: 0x0021BF68 File Offset: 0x0021A168
[Token(Token = "0x17001876")]
public virtual string AlgorithmName
{
[Token(Token = "0x6009850")]
[Address(RVA = "0x20E7220", Offset = "0x20E5C20", VA = "0x1820E7220", Slot = "19")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/CCM";
}
}
// Token: 0x06009851 RID: 38993 RVA: 0x0021BF90 File Offset: 0x0021A190
[Token(Token = "0x6009851")]
[Address(RVA = "0x20E61B0", Offset = "0x20E4BB0", VA = "0x1820E61B0", Slot = "20")]
public virtual int GetBlockSize()
{
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x06009852 RID: 38994 RVA: 0x0021BFAC File Offset: 0x0021A1AC
[Token(Token = "0x6009852")]
[Address(RVA = "0x20E65C0", Offset = "0x20E4FC0", VA = "0x1820E65C0", Slot = "21")]
public virtual void ProcessAadByte(byte input)
{
((IDisposable)this.associatedText).Dispose();
}
// Token: 0x06009853 RID: 38995 RVA: 0x0021BFCC File Offset: 0x0021A1CC
[Token(Token = "0x6009853")]
[Address(RVA = "0x20E65F0", Offset = "0x20E4FF0", VA = "0x1820E65F0", Slot = "22")]
public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len)
{
int num = this.associatedText.Read(inBytes, inOff, len);
}
// Token: 0x06009854 RID: 38996 RVA: 0x0021BFF0 File Offset: 0x0021A1F0
[Token(Token = "0x6009854")]
[Address(RVA = "0x20E6620", Offset = "0x20E5020", VA = "0x1820E6620", Slot = "23")]
public virtual int ProcessByte(byte input, byte[] outBytes, int outOff)
{
MemoryStream memoryStream = this.data;
return 0;
}
// Token: 0x06009855 RID: 38997 RVA: 0x0021C00C File Offset: 0x0021A20C
[Token(Token = "0x6009855")]
[Address(RVA = "0x20E6650", Offset = "0x20E5050", VA = "0x1820E6650", Slot = "24")]
public virtual int ProcessBytes(byte[] inBytes, int inOff, int inLen, byte[] outBytes, int outOff)
{
Check.DataLength(inBytes, inOff, inOff, "Input buffer too short");
int num = this.data.ReadByte();
return 0;
}
// Token: 0x06009856 RID: 38998 RVA: 0x0021C03C File Offset: 0x0021A23C
[Token(Token = "0x6009856")]
[Address(RVA = "0x20E60A0", Offset = "0x20E4AA0", VA = "0x1820E60A0", Slot = "25")]
public virtual int DoFinal(byte[] outBytes, int outOff)
{
MemoryStream memoryStream = this.data;
long length = this.data.Length;
throw new NullReferenceException();
}
// Token: 0x06009857 RID: 38999 RVA: 0x0021C064 File Offset: 0x0021A264
[Token(Token = "0x6009857")]
[Address(RVA = "0x20E6FD0", Offset = "0x20E59D0", VA = "0x1820E6FD0", Slot = "26")]
public virtual void Reset()
{
IBlockCipher blockCipher = this.cipher;
MemoryStream memoryStream = this.associatedText;
((IDisposable)this.data).Dispose();
}
// Token: 0x06009858 RID: 39000 RVA: 0x0021C090 File Offset: 0x0021A290
[Token(Token = "0x6009858")]
[Address(RVA = "0x20E6200", Offset = "0x20E4C00", VA = "0x1820E6200", Slot = "27")]
public virtual byte[] GetMac()
{
byte[] array = this.macBlock;
int num = this.macSize;
int num2 = 0;
return Arrays.CopyOfRange(array, num2, num);
}
// Token: 0x06009859 RID: 39001 RVA: 0x0021C0B8 File Offset: 0x0021A2B8
[Token(Token = "0x6009859")]
[Address(RVA = "0x3F8880", Offset = "0x3F7280", VA = "0x1803F8880", Slot = "28")]
public virtual int GetUpdateOutputSize(int len)
{
return 0;
}
// Token: 0x0600985A RID: 39002 RVA: 0x0021C0C8 File Offset: 0x0021A2C8
[Token(Token = "0x600985A")]
[Address(RVA = "0x20E6270", Offset = "0x20E4C70", VA = "0x1820E6270", Slot = "29")]
public virtual int GetOutputSize(int len)
{
bool flag = this.data.CanWrite;
int num = this.macSize;
flag = (flag ? 1 : 0) + len != 0;
if (!this.forEncryption)
{
if ((flag ? 1 : 0) < num)
{
return 0;
}
flag = (flag ? 1 : 0) - num != 0;
}
flag = (flag ? 1 : 0) + num != 0;
throw new NullReferenceException();
}
// Token: 0x0600985B RID: 39003 RVA: 0x0021C108 File Offset: 0x0021A308
[Token(Token = "0x600985B")]
[Address(RVA = "0x20E6EE0", Offset = "0x20E58E0", VA = "0x1820E6EE0", Slot = "30")]
public virtual byte[] ProcessPacket(byte[] input, int inOff, int inLen)
{
int num = this.macSize;
if (!this.forEncryption)
{
}
byte[] array = new byte[input];
byte[] array2 = this.ProcessPacket(input, inOff, inLen);
return array;
}
// Token: 0x0600985C RID: 39004 RVA: 0x0021C144 File Offset: 0x0021A344
[Token(Token = "0x600985C")]
[Address(RVA = "0x20E66F0", Offset = "0x20E50F0", VA = "0x1820E66F0", Slot = "31")]
public virtual int ProcessPacket(byte[] input, int inOff, int inLen, byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (0600985C)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CcmBlockCipher::ProcessPacket(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_11D:
stloc:InvalidCipherTextException(var_24_127, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in CCM failed")))
}
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: 0x0600985D RID: 39005 RVA: 0x0021C27C File Offset: 0x0021A47C
[Token(Token = "0x600985D")]
[Address(RVA = "0x20E5B90", Offset = "0x20E4590", VA = "0x1820E5B90")]
private int CalculateMac(byte[] data, int dataOff, int dataLen, byte[] macBlock)
{
int num;
CbcBlockCipherMac cbcBlockCipherMac = new CbcBlockCipherMac(this.cipher, dataOff, num);
num = 0;
byte[] array = new byte[16];
bool flag = this.associatedText.CanWrite;
byte[] array2 = this.initialAssociatedText;
if (array2 == 0)
{
}
int length = array2.Length;
flag = (flag ? 1 : 0) + length != 0;
if (flag > false)
{
}
uint num2;
flag = (flag ? 1U : 0U) - num2 != 0U;
flag = flag - typeof(IMac).TypeHandle != null;
array[0] = (flag ? 1 : 0);
byte[] array3 = this.nonce;
uint num3;
array[0] = (byte)num3;
byte[] array4 = this.nonce;
int length2 = array4.Length;
int num4 = 0;
uint num5;
Array.Copy(array4, num4, array, (int)num5, length2);
if (dataLen > 0)
{
int num6 = array.Length;
num6 -= (int)num5;
num5 += (uint)1;
}
int length3 = array.Length;
bool flag2 = this.associatedText.CanWrite;
byte[] array5 = this.initialAssociatedText;
int num7 = 0;
if (array5 == 0)
{
}
flag2 = (flag2 ? 1 : 0) + num7 != 0;
if (flag2 > false)
{
bool canWrite = this.associatedText.CanWrite;
if (this.initialAssociatedText == 0)
{
}
byte[] array6 = this.initialAssociatedText;
if (array6 != 0)
{
int length4 = array6.Length;
}
long length5 = this.associatedText.Length;
MemoryStream memoryStream = this.associatedText;
MemoryStream memoryStream2 = this.associatedText;
long length6 = memoryStream2.Length;
int num8 = 0;
if (memoryStream2 < 0)
{
}
uint num9;
if (length6 < (long)num9)
{
num9 = (uint)((long)num9 - length6);
if (num8 < cbcBlockCipherMac)
{
num8 += num8;
num8++;
}
while (num8 != cbcBlockCipherMac)
{
}
}
}
int num10 = 0;
num10 += 3;
num10 += 19;
throw new NullReferenceException();
}
// Token: 0x0600985E RID: 39006 RVA: 0x0021C40C File Offset: 0x0021A60C
[Token(Token = "0x600985E")]
[Address(RVA = "0x20E6160", Offset = "0x20E4B60", VA = "0x1820E6160")]
private int GetAssociatedTextLength()
{
bool flag = this.associatedText.CanWrite;
byte[] array = this.initialAssociatedText;
if (array == 0)
{
flag = flag + array != null;
}
int length = array.Length;
flag = (flag ? 1 : 0) + length != 0;
throw new NullReferenceException();
}
// Token: 0x0600985F RID: 39007 RVA: 0x0021C444 File Offset: 0x0021A644
[Token(Token = "0x600985F")]
[Address(RVA = "0x20E62E0", Offset = "0x20E4CE0", VA = "0x1820E62E0")]
private bool HasAssociatedText()
{
bool flag = this.associatedText.CanWrite;
byte[] array = this.initialAssociatedText;
if (array == 0)
{
flag = flag + array != null;
return flag > false;
}
int length = array.Length;
flag = (flag ? 1 : 0) + length != 0;
return flag > false;
}
// Token: 0x04006411 RID: 25617
[Token(Token = "0x4006411")]
private static readonly int BlockSize;
// Token: 0x04006412 RID: 25618
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006412")]
private readonly IBlockCipher cipher;
// Token: 0x04006413 RID: 25619
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006413")]
private readonly byte[] macBlock;
// Token: 0x04006414 RID: 25620
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006414")]
private bool forEncryption;
// Token: 0x04006415 RID: 25621
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006415")]
private byte[] nonce;
// Token: 0x04006416 RID: 25622
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006416")]
private byte[] initialAssociatedText;
// Token: 0x04006417 RID: 25623
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006417")]
private int macSize;
// Token: 0x04006418 RID: 25624
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4006418")]
private ICipherParameters keyParam;
// Token: 0x04006419 RID: 25625
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x4006419")]
private readonly MemoryStream associatedText;
// Token: 0x0400641A RID: 25626
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x400641A")]
private readonly MemoryStream data;
}
}
@@ -0,0 +1,223 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001657 RID: 5719
[Token(Token = "0x2001657")]
[StructLayout(3)]
public class CfbBlockCipher : IBlockCipher
{
// Token: 0x06009861 RID: 39009 RVA: 0x0021C498 File Offset: 0x0021A698
[Token(Token = "0x6009861")]
[Address(RVA = "0x20E8170", Offset = "0x20E6B70", VA = "0x1820E8170")]
public CfbBlockCipher(IBlockCipher cipher, int bitBlockSize)
{
this.cipher = cipher;
this.blockSize = bitBlockSize;
byte[] array = new byte[bitBlockSize];
this.IV = array;
byte[] array2 = new byte[array];
this.cfbV = array2;
byte[] array3 = new byte[array2];
this.cfbOutV = array3;
}
// Token: 0x06009862 RID: 39010 RVA: 0x0021C4EC File Offset: 0x0021A6EC
[Token(Token = "0x6009862")]
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x06009863 RID: 39011 RVA: 0x0021C500 File Offset: 0x0021A700
[Token(Token = "0x6009863")]
[Address(RVA = "0x20E7F10", Offset = "0x20E6910", VA = "0x1820E7F10", Slot = "5")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
do
{
this.encrypting = forEncryption;
if (parameters == 0 || parameters == 0)
{
goto IL_5B;
}
}
while (parameters == 0);
byte[] iv = this.IV;
byte[] array;
int length = array.Length;
int num = 0;
int num2 = iv.Length;
num2 -= length;
Array.Copy(array, num, iv, num2, length);
byte[] iv2 = this.IV;
int num3 = 0;
Array.Clear(iv2, num3, num2);
IL_5B:
byte[] iv3 = this.IV;
int length2 = iv3.Length;
int num4 = 0;
byte[] array2 = this.cfbV;
int num5 = 0;
Array.Copy(iv3, num5, array2, num4, length2);
IBlockCipher blockCipher = this.cipher;
if (parameters != 0)
{
IBlockCipher blockCipher2 = this.cipher;
}
}
// Token: 0x17001877 RID: 6263
// (get) Token: 0x06009864 RID: 39012 RVA: 0x0021C5B0 File Offset: 0x0021A7B0
[Token(Token = "0x17001877")]
public string AlgorithmName
{
[Token(Token = "0x6009864")]
[Address(RVA = "0x20E8250", Offset = "0x20E6C50", VA = "0x1820E8250", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
int num = this.blockSize;
string text;
return text;
}
}
// Token: 0x17001878 RID: 6264
// (get) Token: 0x06009865 RID: 39013 RVA: 0x0021C5D4 File Offset: 0x0021A7D4
[Token(Token = "0x17001878")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x6009865")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "7")]
get
{
return true;
}
}
// Token: 0x06009866 RID: 39014 RVA: 0x0021C5E4 File Offset: 0x0021A7E4
[Token(Token = "0x6009866")]
[Address(RVA = "0x4CCC20", Offset = "0x4CB620", VA = "0x1804CCC20", Slot = "6")]
public int GetBlockSize()
{
return this.blockSize;
}
// Token: 0x06009867 RID: 39015 RVA: 0x0021C5F8 File Offset: 0x0021A7F8
[Token(Token = "0x6009867")]
[Address(RVA = "0x20E80D0", Offset = "0x20E6AD0", VA = "0x1820E80D0", Slot = "8")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
if (this.encrypting)
{
int num;
return num;
}
int num2;
return num2;
}
// Token: 0x06009868 RID: 39016 RVA: 0x0021C614 File Offset: 0x0021A814
[Token(Token = "0x6009868")]
[Address(RVA = "0x20E7CF0", Offset = "0x20E66F0", VA = "0x1820E7CF0")]
public int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.cfbOutV;
byte[] array2 = this.cfbV;
int num = this.blockSize;
if (num > 0)
{
byte[] array3 = this.cfbOutV;
int num2 = this.blockSize;
}
byte[] array4 = this.cfbV;
int num3 = array4.Length;
int num4 = 0;
num3 -= num;
Array.Copy(array4, num, array4, num4, num3);
byte[] array5 = this.cfbV;
int num5 = this.blockSize;
int num6 = array5.Length;
num6 -= num5;
return this.blockSize;
}
// Token: 0x06009869 RID: 39017 RVA: 0x0021C6AC File Offset: 0x0021A8AC
[Token(Token = "0x6009869")]
[Address(RVA = "0x20E7AE0", Offset = "0x20E64E0", VA = "0x1820E7AE0")]
public int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.cfbOutV;
byte[] array2 = this.cfbV;
int num = array2.Length;
int num2 = 0;
int num3 = this.blockSize;
num -= num3;
Array.Copy(array2, num3, array2, num2, num);
byte[] array3 = this.cfbV;
int num4 = this.blockSize;
int num5 = array3.Length;
num5 -= num4;
Array.Copy(input, inOff, array3, num5, num4);
int num6 = this.blockSize;
if (num6 > 0)
{
byte[] array4 = this.cfbOutV;
num6 = num4;
int num7 = this.blockSize;
}
return num6;
}
// Token: 0x0600986A RID: 39018 RVA: 0x0021C758 File Offset: 0x0021A958
[Token(Token = "0x600986A")]
[Address(RVA = "0x20E8100", Offset = "0x20E6B00", VA = "0x1820E8100", Slot = "9")]
public void Reset()
{
byte[] iv = this.IV;
int length = iv.Length;
int num = 0;
byte[] array = this.cfbV;
int num2 = 0;
Array.Copy(iv, num2, array, num, length);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x0400641B RID: 25627
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400641B")]
private byte[] IV;
// Token: 0x0400641C RID: 25628
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400641C")]
private byte[] cfbV;
// Token: 0x0400641D RID: 25629
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x400641D")]
private byte[] cfbOutV;
// Token: 0x0400641E RID: 25630
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x400641E")]
private bool encrypting;
// Token: 0x0400641F RID: 25631
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
[Token(Token = "0x400641F")]
private readonly int blockSize;
// Token: 0x04006420 RID: 25632
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006420")]
private readonly IBlockCipher cipher;
}
}
@@ -0,0 +1,162 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001658 RID: 5720
[Token(Token = "0x2001658")]
[StructLayout(3)]
public class CtsBlockCipher : BufferedBlockCipher
{
// Token: 0x0600986B RID: 39019 RVA: 0x0021C798 File Offset: 0x0021A998
[Token(Token = "0x600986B")]
[Address(RVA = "0x20E8B70", Offset = "0x20E7570", VA = "0x1820E8B70")]
public CtsBlockCipher(IBlockCipher cipher)
{
/*
An exception occurred when decompiling this method (0600986B)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_3B:
stloc:ArgumentException(var_3_45, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CtsBlockCipher can only accept ECB, or CBC ciphers")))
}
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: 0x0600986C RID: 39020 RVA: 0x0021C7EC File Offset: 0x0021A9EC
[Token(Token = "0x600986C")]
[Address(RVA = "0x1DDCDD0", Offset = "0x1DDB7D0", VA = "0x181DDCDD0", Slot = "26")]
public override int GetUpdateOutputSize(int length)
{
byte[] buf = this.buf;
int num = this.bufOff;
int length2 = buf.Length;
num += length;
if (length != 0)
{
return num - length;
}
return num - length2;
}
// Token: 0x0600986D RID: 39021 RVA: 0x0021C828 File Offset: 0x0021AA28
[Token(Token = "0x600986D")]
[Address(RVA = "0x20E8770", Offset = "0x20E7170", VA = "0x1820E8770", Slot = "25")]
public override int GetOutputSize(int length)
{
int bufOff = this.bufOff;
return bufOff + length;
}
// Token: 0x0600986E RID: 39022 RVA: 0x0021C844 File Offset: 0x0021AA44
[Token(Token = "0x600986E")]
[Address(RVA = "0x20E8780", Offset = "0x20E7180", VA = "0x1820E8780", Slot = "28")]
public override int ProcessByte(byte input, byte[] output, int outOff)
{
byte[] buf = this.buf;
int num = 0;
int bufOff = this.bufOff;
if (bufOff == buf.Length)
{
IBlockCipher cipher = this.cipher;
byte[] buf2 = this.buf;
int num2 = 0;
int num3 = this.blockSize;
Array.Copy(buf2, num3, buf2, num2, num3);
}
int num4 = bufOff + 1;
this.bufOff = num4;
return num;
}
// Token: 0x0600986F RID: 39023 RVA: 0x0021C8AC File Offset: 0x0021AAAC
[Token(Token = "0x600986F")]
[Address(RVA = "0x20E8880", Offset = "0x20E7280", VA = "0x1820E8880", Slot = "32")]
public override int ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (0600986F)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.CtsBlockCipher::ProcessBytes(System.Byte[],System.Int32,System.Int32,System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_8C:
stloc:uint8[](var_15_95, ldfld:uint8[](BufferedBlockCipher::buf, ldloc:CtsBlockCipher[exp:BufferedBlockCipher](this)))
call:void(Array::Copy, ldloc:uint8[][exp:Array](input), ldloc:int32(inOff), ldloc:uint8[][exp:Array](var_15_95), ldloc:int32(var_13), ldloc:int32(length))
stloc:ArgumentException(var_16_AD, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Can't have a negative input outLength!")))
}
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: 0x06009870 RID: 39024 RVA: 0x0021C968 File Offset: 0x0021AB68
[Token(Token = "0x6009870")]
[Address(RVA = "0x20E82E0", Offset = "0x20E6CE0", VA = "0x1820E82E0", Slot = "36")]
public override int DoFinal(byte[] output, int outOff)
{
for (;;)
{
int num = this.bufOff;
num += outOff;
IBlockCipher cipher = this.cipher;
int bufOff = this.bufOff;
byte[] array = new byte[0];
byte[] array2 = new byte[0];
IBlockCipher cipher2 = this.cipher;
if (cipher2 == 0 || cipher2 != 0)
{
byte[] buf = this.buf;
byte[] buf2 = this.buf;
IBlockCipher cipher3 = this.cipher;
IBlockCipher cipher4 = this.cipher;
int num2 = this.bufOff;
byte[] buf3 = this.buf;
if (num2 != buf3.Length)
{
num2++;
num2++;
byte[] buf4 = this.buf;
}
byte[] buf5 = this.buf;
num2 += buf5;
num2++;
IBlockCipher cipher5 = this.cipher;
if (cipher5 == 0 || cipher5 != 0)
{
break;
}
}
}
int num3;
return num3;
}
// Token: 0x04006421 RID: 25633
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006421")]
private readonly int blockSize;
}
}
@@ -0,0 +1,478 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Macs;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001659 RID: 5721
[Token(Token = "0x2001659")]
[StructLayout(3)]
public class EaxBlockCipher : IAeadBlockCipher
{
// Token: 0x06009871 RID: 39025 RVA: 0x0021CA3C File Offset: 0x0021AC3C
[Token(Token = "0x6009871")]
[Address(RVA = "0x20EAEE0", Offset = "0x20E98E0", VA = "0x1820EAEE0")]
public EaxBlockCipher(IBlockCipher cipher)
{
int num = this.blockSize;
CMac cmac;
this.mac = cmac;
byte[] array = new byte[num];
IMac mac = this.mac;
this.macBlock = array;
byte[] array2 = new byte[array];
IMac mac2 = this.mac;
this.associatedTextMac = array2;
byte[] array3 = new byte[array2];
this.nonceMac = array3;
SicBlockCipher sicBlockCipher = new SicBlockCipher(cipher);
this.cipher = sicBlockCipher;
}
// Token: 0x17001879 RID: 6265
// (get) Token: 0x06009872 RID: 39026 RVA: 0x0021CAB4 File Offset: 0x0021ACB4
[Token(Token = "0x17001879")]
public virtual string AlgorithmName
{
[Token(Token = "0x6009872")]
[Address(RVA = "0x20EB040", Offset = "0x20E9A40", VA = "0x1820EB040", Slot = "17")]
get
{
this.cipher.Reset();
string text;
return text;
}
}
// Token: 0x06009873 RID: 39027 RVA: 0x0021CAD4 File Offset: 0x0021ACD4
[Token(Token = "0x6009873")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "18")]
public virtual IBlockCipher GetUnderlyingCipher()
{
/*
An exception occurred when decompiling this method (06009873)
ICSharpCode.Decompiler.DecompilerException: Error decompiling BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::GetUnderlyingCipher()
---> System.Exception: Basic block has to end with unconditional control flow.
{
Block_0:
stloc:SicBlockCipher(var_0_06, ldfld:SicBlockCipher(EaxBlockCipher::cipher, ldloc:EaxBlockCipher(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: 0x06009874 RID: 39028 RVA: 0x0021CAE8 File Offset: 0x0021ACE8
[Token(Token = "0x6009874")]
[Address(RVA = "0x20EA340", Offset = "0x20E8D40", VA = "0x1820EA340", Slot = "19")]
public virtual int GetBlockSize()
{
string algorithmName = ((IBlockCipher)this.cipher).AlgorithmName;
throw new NullReferenceException();
}
// Token: 0x06009875 RID: 39029 RVA: 0x0021CB08 File Offset: 0x0021AD08
[Token(Token = "0x6009875")]
[Address(RVA = "0x20EA510", Offset = "0x20E8F10", VA = "0x1820EA510", Slot = "20")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (06009875)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_E3:
stloc:ArgumentException(var_22_ED, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("invalid parameters passed to EAX")))
}
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: 0x06009876 RID: 39030 RVA: 0x0021CC04 File Offset: 0x0021AE04
[Token(Token = "0x6009876")]
[Address(RVA = "0x20EA440", Offset = "0x20E8E40", VA = "0x1820EA440")]
private void InitCipher()
{
if (!this.cipherInitialized)
{
IMac mac = this.mac;
this.cipherInitialized = true;
byte[] array = new byte[this.blockSize];
int num = this.blockSize;
IMac mac2 = this.mac;
int num2 = this.blockSize;
}
}
// Token: 0x06009877 RID: 39031 RVA: 0x0021CC54 File Offset: 0x0021AE54
[Token(Token = "0x6009877")]
[Address(RVA = "0x20E9F00", Offset = "0x20E8900", VA = "0x1820E9F00")]
private void CalculateMac()
{
byte[] array = new byte[this.blockSize];
IMac mac = this.mac;
int num = 0;
byte[] array2 = this.macBlock;
if (num < array2.Length)
{
byte[] array3 = this.nonceMac;
byte[] array4 = this.associatedTextMac;
num++;
byte[] array5 = this.macBlock;
}
}
// Token: 0x06009878 RID: 39032 RVA: 0x0021CCA8 File Offset: 0x0021AEA8
[Token(Token = "0x6009878")]
[Address(RVA = "0x20EACF0", Offset = "0x20E96F0", VA = "0x1820EACF0", Slot = "21")]
public virtual void Reset()
{
this.Reset(true);
}
// Token: 0x06009879 RID: 39033 RVA: 0x0021CCBC File Offset: 0x0021AEBC
[Token(Token = "0x6009879")]
[Address(RVA = "0x20EAD00", Offset = "0x20E9700", VA = "0x1820EAD00")]
private void Reset(bool clearMac)
{
SicBlockCipher sicBlockCipher = this.cipher;
IMac mac = this.mac;
byte[] array = this.bufBlock;
this.bufOff = (int)((ulong)0L);
int length = array.Length;
int num = 0;
Array.Clear(array, num, length);
if (clearMac)
{
byte[] array2 = this.macBlock;
int length2 = array2.Length;
int num2 = 0;
Array.Clear(array2, num2, length2);
}
byte[] array3 = new byte[this.blockSize];
int num3 = this.blockSize;
IMac mac2 = this.mac;
int num4 = this.blockSize;
byte[] array4 = this.initialAssociatedText;
this.cipherInitialized = false;
if (array4 != 0)
{
this.ProcessAadByte(array4);
}
}
// Token: 0x0600987A RID: 39034 RVA: 0x0021CD68 File Offset: 0x0021AF68
[Token(Token = "0x600987A")]
[Address(RVA = "0x20EA8B0", Offset = "0x20E92B0", VA = "0x1820EA8B0", Slot = "22")]
public virtual void ProcessAadByte(byte input)
{
/*
An exception occurred when decompiling this method (0600987A)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::ProcessAadByte(System.Byte)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_10:
stloc:InvalidOperationException(var_1_1A, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("AAD data cannot be added after encryption/decryption processing has begun.")))
}
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: 0x0600987B RID: 39035 RVA: 0x0021CD90 File Offset: 0x0021AF90
[Token(Token = "0x600987B")]
[Address(RVA = "0x20EA940", Offset = "0x20E9340", VA = "0x1820EA940", Slot = "23")]
public virtual void ProcessAadBytes(byte[] inBytes, int inOff, int len)
{
/*
An exception occurred when decompiling this method (0600987B)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::ProcessAadBytes(System.Byte[],System.Int32,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_11:
stloc:InvalidOperationException(var_1_1B, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("AAD data cannot be added after encryption/decryption processing has begun.")))
}
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: 0x0600987C RID: 39036 RVA: 0x0021CDB8 File Offset: 0x0021AFB8
[Token(Token = "0x600987C")]
[Address(RVA = "0x20EAA00", Offset = "0x20E9400", VA = "0x1820EAA00", Slot = "24")]
public virtual int ProcessByte(byte input, byte[] outBytes, int outOff)
{
this.InitCipher();
return this.Process(input, outBytes, outOff);
}
// Token: 0x0600987D RID: 39037 RVA: 0x0021CDD4 File Offset: 0x0021AFD4
[Token(Token = "0x600987D")]
[Address(RVA = "0x20EAA60", Offset = "0x20E9460", VA = "0x1820EAA60", Slot = "25")]
public virtual int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff)
{
this.InitCipher();
int num = 0;
if (len != 0)
{
int num2;
num += num2;
num2 = inOff;
num2 -= inOff;
while (num2 != len)
{
}
}
return num;
}
// Token: 0x0600987E RID: 39038 RVA: 0x0021CE04 File Offset: 0x0021B004
[Token(Token = "0x600987E")]
[Address(RVA = "0x20EA030", Offset = "0x20E8A30", VA = "0x1820EA030", Slot = "26")]
public virtual int DoFinal(byte[] outBytes, int outOff)
{
/*
An exception occurred when decompiling this method (0600987E)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.EaxBlockCipher::DoFinal(System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_148:
stloc:InvalidCipherTextException(var_22_152, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in EAX failed")))
}
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.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.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: 0x0600987F RID: 39039 RVA: 0x0021CF64 File Offset: 0x0021B164
[Token(Token = "0x600987F")]
[Address(RVA = "0x20EA370", Offset = "0x20E8D70", VA = "0x1820EA370", Slot = "27")]
public virtual byte[] GetMac()
{
byte[] array = new byte[this.macSize];
int num = this.macSize;
int num2 = 0;
int num3 = 0;
Array.Copy(this.macBlock, num3, array, num2, num);
return array;
}
// Token: 0x06009880 RID: 39040 RVA: 0x0021CF9C File Offset: 0x0021B19C
[Token(Token = "0x6009880")]
[Address(RVA = "0x20EA410", Offset = "0x20E8E10", VA = "0x1820EA410", Slot = "28")]
public virtual int GetUpdateOutputSize(int len)
{
int num = this.bufOff;
num += len;
if (!this.forEncryption)
{
int num2 = this.macSize;
num -= num2;
}
return num - len;
}
// Token: 0x06009881 RID: 39041 RVA: 0x0021CFD0 File Offset: 0x0021B1D0
[Token(Token = "0x6009881")]
[Address(RVA = "0x20EA3E0", Offset = "0x20E8DE0", VA = "0x1820EA3E0", Slot = "29")]
public virtual int GetOutputSize(int len)
{
int num = this.bufOff;
int num2 = this.macSize;
num += len;
if (this.forEncryption)
{
return num2 + num;
}
if (num < num2)
{
return 0;
}
return num - num2;
}
// Token: 0x06009882 RID: 39042 RVA: 0x0021D00C File Offset: 0x0021B20C
[Token(Token = "0x6009882")]
[Address(RVA = "0x20EAB20", Offset = "0x20E9520", VA = "0x1820EAB20")]
private int Process(byte b, byte[] outBytes, int outOff)
{
int num = this.bufOff;
byte[] array = this.bufBlock;
int num2 = num + 1;
this.bufOff = num2;
int length = this.bufBlock.Length;
if (this.bufOff != length)
{
return 0;
}
int num3 = 0;
int num4 = this.blockSize;
Check.OutputLength(outBytes, outOff, num4, "Output buffer is too short");
if ((this.forEncryption ? 1 : 0) == num3)
{
IMac mac = this.mac;
int num5 = this.blockSize;
int num6 = this.cipher.GetBlockSize();
}
int num7 = this.cipher.GetBlockSize();
IMac mac2 = this.mac;
int num8 = this.blockSize;
this.bufOff = num3;
if ((this.forEncryption ? 1 : 0) == num3)
{
byte[] array2 = this.bufBlock;
int num9 = 0;
int num10 = this.macSize;
int num11 = this.blockSize;
Array.Copy(array2, num11, array2, num9, num10);
int num12 = this.macSize;
this.bufOff = num12;
}
throw new NullReferenceException();
}
// Token: 0x06009883 RID: 39043 RVA: 0x0021D100 File Offset: 0x0021B300
[Token(Token = "0x6009883")]
[Address(RVA = "0x20EAE50", Offset = "0x20E9850", VA = "0x1820EAE50")]
private bool VerifyMac(byte[] mac, int off)
{
int num = this.macSize;
int num2 = 0;
if (num > 0)
{
byte[] array = this.macBlock;
num2++;
}
return num2 == 0;
}
// Token: 0x04006422 RID: 25634
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006422")]
private SicBlockCipher cipher;
// Token: 0x04006423 RID: 25635
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006423")]
private bool forEncryption;
// Token: 0x04006424 RID: 25636
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
[Token(Token = "0x4006424")]
private int blockSize;
// Token: 0x04006425 RID: 25637
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006425")]
private IMac mac;
// Token: 0x04006426 RID: 25638
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006426")]
private byte[] nonceMac;
// Token: 0x04006427 RID: 25639
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006427")]
private byte[] associatedTextMac;
// Token: 0x04006428 RID: 25640
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006428")]
private byte[] macBlock;
// Token: 0x04006429 RID: 25641
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4006429")]
private int macSize;
// Token: 0x0400642A RID: 25642
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x400642A")]
private byte[] bufBlock;
// Token: 0x0400642B RID: 25643
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x400642B")]
private int bufOff;
// Token: 0x0400642C RID: 25644
[global::Cpp2IlInjected.FieldOffset(Offset = "0x54")]
[Token(Token = "0x400642C")]
private bool cipherInitialized;
// Token: 0x0400642D RID: 25645
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x400642D")]
private byte[] initialAssociatedText;
// Token: 0x0200165A RID: 5722
[Token(Token = "0x200165A")]
private enum Tag : byte
{
// Token: 0x0400642F RID: 25647
[Token(Token = "0x400642F")]
N,
// Token: 0x04006430 RID: 25648
[Token(Token = "0x4006430")]
H,
// Token: 0x04006431 RID: 25649
[Token(Token = "0x4006431")]
C
}
}
}
@@ -0,0 +1,251 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x0200165C RID: 5724
[Token(Token = "0x200165C")]
[StructLayout(3)]
public class GOfbBlockCipher : IBlockCipher
{
// Token: 0x0600989D RID: 39069 RVA: 0x0021DF64 File Offset: 0x0021C164
[Token(Token = "0x600989D")]
[Address(RVA = "0x20EBA60", Offset = "0x20EA460", VA = "0x1820EBA60")]
public GOfbBlockCipher(IBlockCipher cipher)
{
this.cipher = cipher;
byte[] array = new byte[0];
this.IV = array;
byte[] array2 = new byte[array];
this.ofbV = array2;
byte[] array3 = new byte[array2];
this.ofbOutV = array3;
}
// Token: 0x0600989E RID: 39070 RVA: 0x0021DFC0 File Offset: 0x0021C1C0
[Token(Token = "0x600989E")]
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x0600989F RID: 39071 RVA: 0x0021DFD4 File Offset: 0x0021C1D4
[Token(Token = "0x600989F")]
[Address(RVA = "0x20EB4F0", Offset = "0x20E9EF0", VA = "0x1820EB4F0", Slot = "5")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
do
{
int num = 0;
this.firstStep = true;
this.N3 = num;
if (parameters == 0 || parameters == 0)
{
goto IL_4D;
}
}
while (parameters == 0);
byte[] iv = this.IV;
byte[] array;
int length = array.Length;
int length2 = iv.Length;
int num2 = 0;
int num3 = 0;
Array.Copy(array, num2, iv, num3, length2);
IL_4D:
byte[] iv2 = this.IV;
int length3 = iv2.Length;
int num4 = 0;
byte[] array2 = this.ofbV;
int num5 = 0;
Array.Copy(iv2, num5, array2, num4, length3);
IBlockCipher blockCipher = this.cipher;
if (parameters != 0)
{
IBlockCipher blockCipher2 = this.cipher;
}
}
// Token: 0x1700187B RID: 6267
// (get) Token: 0x060098A0 RID: 39072 RVA: 0x0021E078 File Offset: 0x0021C278
[Token(Token = "0x1700187B")]
public string AlgorithmName
{
[Token(Token = "0x60098A0")]
[Address(RVA = "0x20EBC40", Offset = "0x20EA640", VA = "0x1820EBC40", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/GCTR";
}
}
// Token: 0x1700187C RID: 6268
// (get) Token: 0x060098A1 RID: 39073 RVA: 0x0021E0A0 File Offset: 0x0021C2A0
[Token(Token = "0x1700187C")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x60098A1")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "7")]
get
{
return true;
}
}
// Token: 0x060098A2 RID: 39074 RVA: 0x0021E0B0 File Offset: 0x0021C2B0
[Token(Token = "0x60098A2")]
[Address(RVA = "0x4D24F0", Offset = "0x4D0EF0", VA = "0x1804D24F0", Slot = "6")]
public int GetBlockSize()
{
return this.blockSize;
}
// Token: 0x060098A3 RID: 39075 RVA: 0x0021E0C4 File Offset: 0x0021C2C4
[Token(Token = "0x60098A3")]
[Address(RVA = "0x20EB720", Offset = "0x20EA120", VA = "0x1820EB720", Slot = "8")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
int num = 0;
if ((this.firstStep ? 1 : 0) != num)
{
IBlockCipher blockCipher = this.cipher;
this.firstStep = num != 0;
byte[] array = this.ofbOutV;
byte[] array2 = this.ofbOutV;
int num2 = 0;
int num3 = this.bytesToint(array2, num2);
byte[] array3 = this.ofbOutV;
this.N3 = num3;
int num4 = this.bytesToint(array3, 4);
this.N4 = num4;
}
int num5 = this.N3;
num5 += 16843009;
int num6 = this.N4;
this.N3 = num5;
if (num6 < 16843012 && num6 > 0)
{
num6++;
this.N4 = num6;
}
byte[] array4 = this.ofbV;
int num7 = 0;
this.intTobytes(num5, array4, num7);
byte[] array5 = this.ofbV;
int n = this.N4;
uint num8;
this.intTobytes(n, array5, (int)num8);
IBlockCipher blockCipher2 = this.cipher;
byte[] array6 = this.ofbOutV;
int num9;
if (this.blockSize > 0)
{
byte[] array7 = this.ofbOutV;
num9 = this.blockSize;
}
byte[] array8 = this.ofbV;
int num10 = array8.Length;
int num11 = 0;
num10 -= num9;
Array.Copy(array8, num9, array8, num11, num10);
byte[] array9 = this.ofbV;
int num12 = this.blockSize;
int num13 = 0;
int num14 = array9.Length;
byte[] array10 = this.ofbOutV;
num14 -= num12;
Array.Copy(array10, num13, array9, num14, num12);
return this.blockSize;
}
// Token: 0x060098A4 RID: 39076 RVA: 0x0021E234 File Offset: 0x0021C434
[Token(Token = "0x60098A4")]
[Address(RVA = "0x20EB9F0", Offset = "0x20EA3F0", VA = "0x1820EB9F0", Slot = "9")]
public void Reset()
{
byte[] iv = this.IV;
int length = iv.Length;
int num = 0;
byte[] array = this.ofbV;
int num2 = 0;
Array.Copy(iv, num2, array, num, length);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x060098A5 RID: 39077 RVA: 0x0021E274 File Offset: 0x0021C474
[Token(Token = "0x60098A5")]
[Address(RVA = "0x20EBB80", Offset = "0x20EA580", VA = "0x1820EBB80")]
private int bytesToint(byte[] inBytes, int inOff)
{
int length = inBytes.Length;
int num = inOff + 1;
byte b;
byte b2;
b += b2;
b += b2;
byte b3;
b += b3;
throw new NullReferenceException();
}
// Token: 0x060098A6 RID: 39078 RVA: 0x0021E2A0 File Offset: 0x0021C4A0
[Token(Token = "0x60098A6")]
[Address(RVA = "0x20EBCA0", Offset = "0x20EA6A0", VA = "0x1820EBCA0")]
private void intTobytes(int num, byte[] outBytes, int outOff)
{
int num2 = outOff + 1;
}
// Token: 0x0400644C RID: 25676
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400644C")]
private byte[] IV;
// Token: 0x0400644D RID: 25677
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400644D")]
private byte[] ofbV;
// Token: 0x0400644E RID: 25678
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x400644E")]
private byte[] ofbOutV;
// Token: 0x0400644F RID: 25679
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x400644F")]
private readonly int blockSize;
// Token: 0x04006450 RID: 25680
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006450")]
private readonly IBlockCipher cipher;
// Token: 0x04006451 RID: 25681
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006451")]
private bool firstStep = true;
// Token: 0x04006452 RID: 25682
[global::Cpp2IlInjected.FieldOffset(Offset = "0x3C")]
[Token(Token = "0x4006452")]
private int N3;
// Token: 0x04006453 RID: 25683
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4006453")]
private int N4;
// Token: 0x04006454 RID: 25684
[Token(Token = "0x4006454")]
private const int C1 = 16843012;
// Token: 0x04006455 RID: 25685
[Token(Token = "0x4006455")]
private const int C2 = 16843009;
}
}
@@ -0,0 +1,51 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x02001664 RID: 5732
[Token(Token = "0x2001664")]
[StructLayout(3)]
public class BasicGcmExponentiator : IGcmExponentiator
{
// Token: 0x0600990D RID: 39181 RVA: 0x00220460 File Offset: 0x0021E660
[Token(Token = "0x600990D")]
[Address(RVA = "0x20E3C20", Offset = "0x20E2620", VA = "0x1820E3C20", Slot = "4")]
public void Init(byte[] x)
{
uint[] array = new uint[4];
int num = 0;
Pack.BE_To_UInt32(x, num, array);
this.x = array;
}
// Token: 0x0600990E RID: 39182 RVA: 0x00220488 File Offset: 0x0021E688
[Token(Token = "0x600990E")]
[Address(RVA = "0x20E3A80", Offset = "0x20E2480", VA = "0x1820E3A80", Slot = "5")]
public void ExponentiateX(long pow, byte[] output)
{
uint[] array = new uint[4];
array[0] = (uint)((ulong)2147483648L);
uint[] array2 = Arrays.Clone(this.x);
GcmUtilities.Multiply(array, array2);
GcmUtilities.Multiply(array2, array2);
int num = 0;
Pack.UInt32_To_BE(array, output, num);
}
// Token: 0x0600990F RID: 39183 RVA: 0x002204D8 File Offset: 0x0021E6D8
[Token(Token = "0x600990F")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
public BasicGcmExponentiator()
{
}
// Token: 0x04006497 RID: 25751
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006497")]
private uint[] x;
}
}
@@ -0,0 +1,50 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x02001665 RID: 5733
[Token(Token = "0x2001665")]
[StructLayout(3)]
public class BasicGcmMultiplier : IGcmMultiplier
{
// Token: 0x06009910 RID: 39184 RVA: 0x002204EC File Offset: 0x0021E6EC
[Token(Token = "0x6009910")]
[Address(RVA = "0x20E3CD0", Offset = "0x20E26D0", VA = "0x1820E3CD0", Slot = "4")]
public void Init(byte[] H)
{
uint[] array = new uint[4];
int num = 0;
Pack.BE_To_UInt32(H, num, array);
this.H = array;
}
// Token: 0x06009911 RID: 39185 RVA: 0x00220514 File Offset: 0x0021E714
[Token(Token = "0x6009911")]
[Address(RVA = "0x20E3D80", Offset = "0x20E2780", VA = "0x1820E3D80", Slot = "5")]
public void MultiplyH(byte[] x)
{
uint[] array = new uint[4];
int num = 0;
Pack.BE_To_UInt32(x, num, array);
uint[] h = this.H;
GcmUtilities.Multiply(array, h);
int num2 = 0;
Pack.UInt32_To_BE(array, x, num2);
}
// Token: 0x06009912 RID: 39186 RVA: 0x0022054C File Offset: 0x0021E74C
[Token(Token = "0x6009912")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
public BasicGcmMultiplier()
{
}
// Token: 0x04006498 RID: 25752
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006498")]
private uint[] H;
}
}
@@ -0,0 +1,443 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x02001666 RID: 5734
[Token(Token = "0x2001666")]
[StructLayout(3)]
internal abstract class GcmUtilities
{
// Token: 0x06009913 RID: 39187 RVA: 0x00220560 File Offset: 0x0021E760
[Token(Token = "0x6009913")]
[Address(RVA = "0x20EE090", Offset = "0x20ECA90", VA = "0x1820EE090")]
private static uint[] GenerateLookup()
{
uint[] array = new uint[256];
int num = 0;
num++;
array[0] = (uint)256;
return array;
}
// Token: 0x06009914 RID: 39188 RVA: 0x00220594 File Offset: 0x0021E794
[Token(Token = "0x6009914")]
[Address(RVA = "0x20EEAA0", Offset = "0x20ED4A0", VA = "0x1820EEAA0")]
internal static byte[] OneAsBytes()
{
byte[] array = new byte[16];
array[0] = (byte)((ulong)128L);
return array;
}
// Token: 0x06009915 RID: 39189 RVA: 0x002205C0 File Offset: 0x0021E7C0
[Token(Token = "0x6009915")]
[Address(RVA = "0x20EEB00", Offset = "0x20ED500", VA = "0x1820EEB00")]
internal static uint[] OneAsUints()
{
uint[] array = new uint[4];
array[0] = (uint)((ulong)2147483648L);
return array;
}
// Token: 0x06009916 RID: 39190 RVA: 0x002205EC File Offset: 0x0021E7EC
[Token(Token = "0x6009916")]
[Address(RVA = "0x20EEB60", Offset = "0x20ED560", VA = "0x1820EEB60")]
internal static ulong[] OneAsUlongs()
{
ulong[] array = new ulong[2];
array[0] = (ulong)long.MinValue;
return array;
}
// Token: 0x06009917 RID: 39191 RVA: 0x00220618 File Offset: 0x0021E818
[Token(Token = "0x6009917")]
[Address(RVA = "0x20EDF90", Offset = "0x20EC990", VA = "0x1820EDF90")]
internal static byte[] AsBytes(uint[] x)
{
return Pack.UInt32_To_BE(x);
}
// Token: 0x06009918 RID: 39192 RVA: 0x0022062C File Offset: 0x0021E82C
[Token(Token = "0x6009918")]
[Address(RVA = "0x20EDFA0", Offset = "0x20EC9A0", VA = "0x1820EDFA0")]
internal static void AsBytes(uint[] x, byte[] z)
{
int num = 0;
Pack.UInt32_To_BE(x, z, num);
}
// Token: 0x06009919 RID: 39193 RVA: 0x00220644 File Offset: 0x0021E844
[Token(Token = "0x6009919")]
[Address(RVA = "0x20EDF20", Offset = "0x20EC920", VA = "0x1820EDF20")]
internal static byte[] AsBytes(ulong[] x)
{
byte[] array = new byte[16];
int num = 0;
Pack.UInt64_To_BE(x, array, num);
return array;
}
// Token: 0x0600991A RID: 39194 RVA: 0x00220664 File Offset: 0x0021E864
[Token(Token = "0x600991A")]
[Address(RVA = "0x20EDF80", Offset = "0x20EC980", VA = "0x1820EDF80")]
internal static void AsBytes(ulong[] x, byte[] z)
{
int num = 0;
Pack.UInt64_To_BE(x, z, num);
}
// Token: 0x0600991B RID: 39195 RVA: 0x0022067C File Offset: 0x0021E87C
[Token(Token = "0x600991B")]
[Address(RVA = "0x20EDFC0", Offset = "0x20EC9C0", VA = "0x1820EDFC0")]
internal static uint[] AsUints(byte[] bs)
{
uint[] array = new uint[4];
int num = 0;
Pack.BE_To_UInt32(bs, num, array);
return array;
}
// Token: 0x0600991C RID: 39196 RVA: 0x0022069C File Offset: 0x0021E89C
[Token(Token = "0x600991C")]
[Address(RVA = "0x20EDFB0", Offset = "0x20EC9B0", VA = "0x1820EDFB0")]
internal static void AsUints(byte[] bs, uint[] output)
{
int num = 0;
Pack.BE_To_UInt32(bs, num, output);
}
// Token: 0x0600991D RID: 39197 RVA: 0x002206B4 File Offset: 0x0021E8B4
[Token(Token = "0x600991D")]
[Address(RVA = "0x20EE020", Offset = "0x20ECA20", VA = "0x1820EE020")]
internal static ulong[] AsUlongs(byte[] x)
{
ulong[] array = new ulong[2];
int num = 0;
Pack.BE_To_UInt64(x, num, array);
return array;
}
// Token: 0x0600991E RID: 39198 RVA: 0x002206D4 File Offset: 0x0021E8D4
[Token(Token = "0x600991E")]
[Address(RVA = "0x20EE080", Offset = "0x20ECA80", VA = "0x1820EE080")]
public static void AsUlongs(byte[] x, ulong[] z)
{
int num = 0;
Pack.BE_To_UInt64(x, num, z);
}
// Token: 0x0600991F RID: 39199 RVA: 0x002206EC File Offset: 0x0021E8EC
[Token(Token = "0x600991F")]
[Address(RVA = "0x20EE850", Offset = "0x20ED250", VA = "0x1820EE850")]
internal static void Multiply(byte[] x, byte[] y)
{
uint[] array = new uint[4];
int num = 0;
Pack.BE_To_UInt32(x, num, array);
uint[] array2 = new uint[4];
int num2 = 0;
Pack.BE_To_UInt32(y, num2, array2);
GcmUtilities.Multiply(array, array2);
int num3 = 0;
Pack.UInt32_To_BE(array, x, num3);
}
// Token: 0x06009920 RID: 39200 RVA: 0x00220730 File Offset: 0x0021E930
[Token(Token = "0x6009920")]
[Address(RVA = "0x20EE670", Offset = "0x20ED070", VA = "0x1820EE670")]
internal static void Multiply(uint[] x, uint[] y)
{
int length = x.Length;
int num = 0;
uint num2 = y[num];
num2 += num2;
while (num != y.Length)
{
}
num++;
x[0] = (uint)num;
x[0] = (uint)num;
x[1] = (uint)num;
x[1] = (uint)num;
}
// Token: 0x06009921 RID: 39201 RVA: 0x00220788 File Offset: 0x0021E988
[Token(Token = "0x6009921")]
[Address(RVA = "0x20EE960", Offset = "0x20ED360", VA = "0x1820EE960")]
internal static void Multiply(ulong[] x, ulong[] y)
{
int length = x.Length;
ulong num = x[1];
int num2 = 0;
ulong num3 = y[num2];
num3 += num3;
while (num2 != y.Length)
{
}
num2++;
x[0] = (ulong)num2;
x[1] = (ulong)num2;
}
// Token: 0x06009922 RID: 39202 RVA: 0x002207D8 File Offset: 0x0021E9D8
[Token(Token = "0x6009922")]
[Address(RVA = "0x20EE3B0", Offset = "0x20ECDB0", VA = "0x1820EE3B0")]
internal static void MultiplyP(uint[] x)
{
uint num = x[0];
x[0] = num;
uint num2 = x[0];
num = num2;
x[0] = num;
uint num3 = x[1];
x[1] = num2;
x[1] = num3;
}
// Token: 0x06009923 RID: 39203 RVA: 0x00220828 File Offset: 0x0021EA28
[Token(Token = "0x6009923")]
[Address(RVA = "0x20EE4C0", Offset = "0x20ECEC0", VA = "0x1820EE4C0")]
internal static void MultiplyP(uint[] x, uint[] z)
{
uint num = x[0];
z[0] = num;
uint num2 = x[0];
num = num2;
z[0] = num;
uint num3 = x[1];
z[1] = num2;
z[1] = num3;
}
// Token: 0x06009924 RID: 39204 RVA: 0x00220878 File Offset: 0x0021EA78
[Token(Token = "0x6009924")]
[Address(RVA = "0x20EE260", Offset = "0x20ECC60", VA = "0x1820EE260")]
internal static void MultiplyP8(uint[] x)
{
uint num = x[0];
x[0] = num;
uint num2 = x[0];
num = num2;
x[0] = num;
uint num3 = x[1];
x[1] = num2;
num = x[1];
x[1] = num3;
}
// Token: 0x06009925 RID: 39205 RVA: 0x002208D0 File Offset: 0x0021EAD0
[Token(Token = "0x6009925")]
[Address(RVA = "0x20EE1A0", Offset = "0x20ECBA0", VA = "0x1820EE1A0")]
internal static void MultiplyP8(uint[] x, uint[] y)
{
uint num = GcmUtilities.ShiftRightN(x, 8, y);
}
// Token: 0x06009926 RID: 39206 RVA: 0x002208EC File Offset: 0x0021EAEC
[Token(Token = "0x6009926")]
[Address(RVA = "0x20EEE30", Offset = "0x20ED830", VA = "0x1820EEE30")]
internal static uint ShiftRight(uint[] x)
{
uint num = x[0];
x[0] = num;
uint num2 = x[0];
num = num2;
x[0] = num;
uint num3 = x[1];
x[1] = num2;
uint num4 = x[1];
x[1] = num3;
return num4;
}
// Token: 0x06009927 RID: 39207 RVA: 0x00220948 File Offset: 0x0021EB48
[Token(Token = "0x6009927")]
[Address(RVA = "0x20EEEF0", Offset = "0x20ED8F0", VA = "0x1820EEEF0")]
internal static uint ShiftRight(uint[] x, uint[] z)
{
uint num = x[0];
z[0] = num;
uint num2 = x[0];
num = num2;
z[0] = num;
uint num3 = x[1];
z[1] = num2;
uint num4 = x[1];
z[1] = num3;
return num4;
}
// Token: 0x06009928 RID: 39208 RVA: 0x002209A0 File Offset: 0x0021EBA0
[Token(Token = "0x6009928")]
[Address(RVA = "0x20EED40", Offset = "0x20ED740", VA = "0x1820EED40")]
internal static uint ShiftRightN(uint[] x, int n)
{
uint num = x[0];
x[0] = num;
uint num2 = x[0];
num = num2;
x[0] = num;
uint num3 = x[1];
x[1] = num2;
uint num4 = x[1];
x[1] = num3;
return num4;
}
// Token: 0x06009929 RID: 39209 RVA: 0x002209FC File Offset: 0x0021EBFC
[Token(Token = "0x6009929")]
[Address(RVA = "0x20EEBD0", Offset = "0x20ED5D0", VA = "0x1820EEBD0")]
internal static uint ShiftRightN(uint[] x, int n, uint[] z)
{
uint num = x[0];
z[0] = num;
uint num2 = x[0];
num = num2;
z[0] = num;
uint num3 = x[1];
z[1] = num2;
uint num4 = x[1];
z[1] = num3;
return num4;
}
// Token: 0x0600992A RID: 39210 RVA: 0x00220A58 File Offset: 0x0021EC58
[Token(Token = "0x600992A")]
[Address(RVA = "0x20EF680", Offset = "0x20EE080", VA = "0x1820EF680")]
internal static void Xor(byte[] x, byte[] y)
{
int num = 0;
num += 3;
if (4UL < (ulong)16L)
{
}
}
// Token: 0x0600992B RID: 39211 RVA: 0x00220A78 File Offset: 0x0021EC78
[Token(Token = "0x600992B")]
[Address(RVA = "0x20EF030", Offset = "0x20EDA30", VA = "0x1820EF030")]
internal static void Xor(byte[] x, byte[] y, int yOff)
{
int num = 0;
num++;
num++;
num += 2;
num++;
num++;
}
// Token: 0x0600992C RID: 39212 RVA: 0x00220AA4 File Offset: 0x0021ECA4
[Token(Token = "0x600992C")]
[Address(RVA = "0x20EF7D0", Offset = "0x20EE1D0", VA = "0x1820EF7D0")]
internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, byte[] z, int zOff)
{
int num = 0;
num += 4;
}
// Token: 0x0600992D RID: 39213 RVA: 0x00220AC0 File Offset: 0x0021ECC0
[Token(Token = "0x600992D")]
[Address(RVA = "0x20EF610", Offset = "0x20EE010", VA = "0x1820EF610")]
internal static void Xor(byte[] x, byte[] y, int yOff, int yLen)
{
int num = yLen - 1;
}
// Token: 0x0600992E RID: 39214 RVA: 0x00220AD8 File Offset: 0x0021ECD8
[Token(Token = "0x600992E")]
[Address(RVA = "0x20EFB30", Offset = "0x20EE530", VA = "0x1820EFB30")]
internal static void Xor(byte[] x, int xOff, byte[] y, int yOff, int len)
{
}
// Token: 0x0600992F RID: 39215 RVA: 0x00220AEC File Offset: 0x0021ECEC
[Token(Token = "0x600992F")]
[Address(RVA = "0x20EF440", Offset = "0x20EDE40", VA = "0x1820EF440")]
internal static void Xor(byte[] x, byte[] y, byte[] z)
{
int num = 0;
byte b = x[num];
z[0] = b;
num += 3;
if (4UL < (ulong)16L)
{
}
}
// Token: 0x06009930 RID: 39216 RVA: 0x00220B1C File Offset: 0x0021ED1C
[Token(Token = "0x6009930")]
[Address(RVA = "0x20EF350", Offset = "0x20EDD50", VA = "0x1820EF350")]
internal static void Xor(uint[] x, uint[] y)
{
uint num = y[1];
}
// Token: 0x06009931 RID: 39217 RVA: 0x00220B38 File Offset: 0x0021ED38
[Token(Token = "0x6009931")]
[Address(RVA = "0x20EF1B0", Offset = "0x20EDBB0", VA = "0x1820EF1B0")]
internal static void Xor(uint[] x, uint[] y, uint[] z)
{
uint num = y[0];
z[0] = num;
uint num2 = y[0];
z[0] = num2;
uint num3 = y[1];
z[1] = num3;
uint num4 = y[1];
z[1] = num4;
}
// Token: 0x06009932 RID: 39218 RVA: 0x00220B8C File Offset: 0x0021ED8C
[Token(Token = "0x6009932")]
[Address(RVA = "0x20EF9E0", Offset = "0x20EE3E0", VA = "0x1820EF9E0")]
internal static void Xor(ulong[] x, ulong[] y)
{
ulong num = y[1];
}
// Token: 0x06009933 RID: 39219 RVA: 0x00220BA8 File Offset: 0x0021EDA8
[Token(Token = "0x6009933")]
[Address(RVA = "0x20EFA70", Offset = "0x20EE470", VA = "0x1820EFA70")]
internal static void Xor(ulong[] x, ulong[] y, ulong[] z)
{
ulong num = y[0];
z[0] = num;
ulong num2 = y[1];
z[1] = num2;
}
// Token: 0x06009934 RID: 39220 RVA: 0x00220BDC File Offset: 0x0021EDDC
[Token(Token = "0x6009934")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
protected GcmUtilities()
{
}
// Token: 0x06009935 RID: 39221 RVA: 0x00220BF0 File Offset: 0x0021EDF0
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009935")]
[Address(RVA = "0x20EFBC0", Offset = "0x20EE5C0", VA = "0x1820EFBC0")]
static GcmUtilities()
{
uint[] array = new uint[256];
int num = 0;
num++;
array[0] = (uint)256;
}
// Token: 0x04006499 RID: 25753
[Token(Token = "0x4006499")]
private const uint E1 = 3774873600U;
// Token: 0x0400649A RID: 25754
[Token(Token = "0x400649A")]
private const ulong E1L = 16212958658533785600UL;
// Token: 0x0400649B RID: 25755
[Token(Token = "0x400649B")]
private static readonly uint[] LOOKUP;
}
}
@@ -0,0 +1,22 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x02001667 RID: 5735
[Token(Token = "0x2001667")]
[StructLayout(3)]
public interface IGcmExponentiator
{
// Token: 0x06009936 RID: 39222
[Token(Token = "0x6009936")]
[Address(Slot = "0")]
void Init(byte[] x);
// Token: 0x06009937 RID: 39223
[Token(Token = "0x6009937")]
[Address(Slot = "1")]
void ExponentiateX(long pow, byte[] output);
}
}
@@ -0,0 +1,22 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x02001668 RID: 5736
[Token(Token = "0x2001668")]
[StructLayout(3)]
public interface IGcmMultiplier
{
// Token: 0x06009938 RID: 39224
[Token(Token = "0x6009938")]
[Address(Slot = "0")]
void Init(byte[] H);
// Token: 0x06009939 RID: 39225
[Token(Token = "0x6009939")]
[Address(Slot = "1")]
void MultiplyH(byte[] x);
}
}
@@ -0,0 +1,94 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x02001669 RID: 5737
[Token(Token = "0x2001669")]
[StructLayout(3)]
public class Tables1kGcmExponentiator : IGcmExponentiator
{
// Token: 0x0600993A RID: 39226 RVA: 0x00220C24 File Offset: 0x0021EE24
[Token(Token = "0x600993A")]
[Address(RVA = "0x20F98B0", Offset = "0x20F82B0", VA = "0x1820F98B0", Slot = "4")]
public void Init(byte[] x)
{
uint[] array;
do
{
array = new uint[4];
int num = 0;
Pack.BE_To_UInt32(x, num, array);
if (this.lookupPowX2 == 0)
{
goto IL_2C;
}
if (array == 0)
{
}
}
while (array == 0);
if (Arrays.AreEqual(array, array))
{
return;
}
IL_2C:
IList list = Platform.CreateArrayList(8);
this.lookupPowX2 = list;
}
// Token: 0x0600993B RID: 39227 RVA: 0x00220C74 File Offset: 0x0021EE74
[Token(Token = "0x600993B")]
[Address(RVA = "0x20F9720", Offset = "0x20F8120", VA = "0x1820F9720", Slot = "5")]
public void ExponentiateX(long pow, byte[] output)
{
uint[] array = new uint[4];
int num = 0;
array[0] = (uint)((ulong)2147483648L);
this.EnsureAvailable(num);
IList list = this.lookupPowX2;
GcmUtilities.Multiply(array, array);
num++;
int num2 = 0;
Pack.UInt32_To_BE(array, output, num2);
}
// Token: 0x0600993C RID: 39228 RVA: 0x00220CC4 File Offset: 0x0021EEC4
[Token(Token = "0x600993C")]
[Address(RVA = "0x20F9540", Offset = "0x20F7F40", VA = "0x1820F9540")]
private void EnsureAvailable(int bit)
{
IList list = this.lookupPowX2;
IList list2 = this.lookupPowX2;
int i = 0;
int num = 0;
uint[] array;
GcmUtilities.Multiply(array, array);
IList list3 = this.lookupPowX2;
if (i < num)
{
i += i;
i++;
}
while (i <= bit)
{
}
}
// Token: 0x0600993D RID: 39229 RVA: 0x00220D20 File Offset: 0x0021EF20
[Token(Token = "0x600993D")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
public Tables1kGcmExponentiator()
{
}
// Token: 0x0400649C RID: 25756
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400649C")]
private IList lookupPowX2;
}
}
@@ -0,0 +1,107 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x0200166A RID: 5738
[Token(Token = "0x200166A")]
[StructLayout(3)]
public class Tables64kGcmMultiplier : IGcmMultiplier
{
// Token: 0x0600993E RID: 39230 RVA: 0x00220D34 File Offset: 0x0021EF34
[Token(Token = "0x600993E")]
[Address(RVA = "0x20F9A20", Offset = "0x20F8420", VA = "0x1820F9A20", Slot = "4")]
public void Init(byte[] H)
{
uint[][][] m2;
for (;;)
{
if (this.M != (ulong)0L)
{
if (Arrays.AreEqual(this.H, H))
{
break;
}
}
else
{
uint[][][] array = new uint[16][][];
this.M = array;
}
byte[] array2 = Arrays.Clone(H);
uint[][][] m = this.M;
this.H = array2;
uint[][] array3 = new uint[256][];
if (array3 != 0)
{
}
m[0] = array3;
uint[][] array4 = this.M[0];
uint[] array5 = new uint[4];
if (array5 != 0)
{
}
array4[0] = array5;
uint[][] array6 = this.M[0];
uint[] array7 = new uint[4];
int num = 0;
Pack.BE_To_UInt32(H, num, array7);
if (array7 != 0)
{
}
array6[128] = array7;
m2 = this.M;
uint[] array8 = m2[0][m2];
if (m2 == 0)
{
}
if (m2 != 0)
{
goto Block_2;
}
}
return;
Block_2:
GcmUtilities.MultiplyP(m2);
uint[][] array9 = this.M[0];
throw new ArrayTypeMismatchException();
}
// Token: 0x0600993F RID: 39231 RVA: 0x00220F10 File Offset: 0x0021F110
[Token(Token = "0x600993F")]
[Address(RVA = "0x20FA240", Offset = "0x20F8C40", VA = "0x1820FA240", Slot = "5")]
public void MultiplyH(byte[] x)
{
uint[] array = new uint[4];
int num = 0;
byte b;
uint num2 = this.M[num][(int)b][1];
num++;
while (num != 16)
{
}
int num3 = 0;
Pack.UInt32_To_BE(array, x, num3);
}
// Token: 0x06009940 RID: 39232 RVA: 0x00220F5C File Offset: 0x0021F15C
[Token(Token = "0x6009940")]
[Address(RVA = "0x3C1670", Offset = "0x3C0070", VA = "0x1803C1670")]
public Tables64kGcmMultiplier()
{
}
// Token: 0x0400649D RID: 25757
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400649D")]
private byte[] H;
// Token: 0x0400649E RID: 25758
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400649E")]
private uint[][][] M;
}
}
@@ -0,0 +1,141 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Utilities;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm
{
// Token: 0x0200166B RID: 5739
[Token(Token = "0x200166B")]
[StructLayout(3)]
public sealed class Tables8kGcmMultiplier : IGcmMultiplier
{
// Token: 0x06009941 RID: 39233 RVA: 0x00220F70 File Offset: 0x0021F170
[Token(Token = "0x6009941")]
[Address(RVA = "0x20FA420", Offset = "0x20F8E20", VA = "0x1820FA420", Slot = "4")]
public void Init(byte[] H)
{
uint[][][] m3;
for (;;)
{
if (this.M != (ulong)0L)
{
if (Arrays.AreEqual(this.H, H))
{
break;
}
}
else
{
uint[][][] array = new uint[32][][];
this.M = array;
}
byte[] array2 = Arrays.Clone(H);
uint[][][] m = this.M;
this.H = array2;
uint[][] array3 = new uint[16][];
if (array3 != 0)
{
}
m[0] = array3;
uint[][][] m2 = this.M;
uint[][] array4 = new uint[16][];
if (array4 != 0)
{
}
m2[1] = array4;
uint[][] array5 = this.M[0];
uint[] array6 = new uint[4];
if (array6 != 0)
{
}
array5[0] = array6;
uint[][] array7 = this.M[1];
uint[] array8 = new uint[4];
if (array8 != 0)
{
}
array7[0] = array8;
uint[][] array9 = this.M[1];
uint[] array10 = new uint[4];
int num = 0;
Pack.BE_To_UInt32(H, num, array10);
if (array10 != 0)
{
}
array9[8] = array10;
m3 = this.M;
uint[] array11 = m3[1][m3];
if (m3 == 0)
{
}
if (m3 != 0)
{
goto Block_2;
}
}
return;
Block_2:
GcmUtilities.MultiplyP(m3);
uint[][] array12 = this.M[1];
throw new ArrayTypeMismatchException();
}
// Token: 0x06009942 RID: 39234 RVA: 0x0022124C File Offset: 0x0021F44C
[Token(Token = "0x6009942")]
[Address(RVA = "0x20FAFB0", Offset = "0x20F99B0", VA = "0x1820FAFB0", Slot = "5")]
public void MultiplyH(byte[] x)
{
uint[] array = this.z;
int length = array.Length;
int num = 0;
Array.Clear(array, num, length);
uint[][] array2 = this.M[length];
uint[] array3 = this.z;
byte b;
uint[] array4 = array2[(int)b];
uint[] array5 = this.z;
uint[] array6 = this.z;
uint[] array7 = this.z;
uint[][][] m = this.M;
int num2 = length + 1;
uint[][] array8 = m[num2];
uint[] array9 = this.z;
byte b2;
uint[] array10 = array8[(int)b2];
uint[] array11 = this.z;
uint[] array12 = this.z;
uint[] array13 = this.z;
uint num3 = array10[1];
uint[] array14 = this.z;
int num4 = 0;
Pack.UInt32_To_BE(array14, x, num4);
}
// Token: 0x06009943 RID: 39235 RVA: 0x00221314 File Offset: 0x0021F514
[Token(Token = "0x6009943")]
[Address(RVA = "0x20FB350", Offset = "0x20F9D50", VA = "0x1820FB350")]
public Tables8kGcmMultiplier()
{
uint[] array = new uint[4];
this.z = array;
base..ctor();
}
// Token: 0x0400649F RID: 25759
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400649F")]
private byte[] H;
// Token: 0x040064A0 RID: 25760
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40064A0")]
private uint[][][] M;
// Token: 0x040064A1 RID: 25761
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40064A1")]
private uint[] z;
}
}
@@ -0,0 +1,712 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x0200165B RID: 5723
[Token(Token = "0x200165B")]
[StructLayout(3)]
public sealed class GcmBlockCipher : IAeadBlockCipher
{
// Token: 0x06009884 RID: 39044 RVA: 0x0021D130 File Offset: 0x0021B330
[Token(Token = "0x6009884")]
[Address(RVA = "0x20ED930", Offset = "0x20EC330", VA = "0x1820ED930")]
public GcmBlockCipher(IBlockCipher c)
{
/*
An exception occurred when decompiling this method (06009884)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_45:
stloc:ArgumentException(var_5_5B, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_4), ldstr:string[exp:object]("."))))
}
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: 0x06009885 RID: 39045 RVA: 0x0021D19C File Offset: 0x0021B39C
[Token(Token = "0x6009885")]
[Address(RVA = "0x20EDA70", Offset = "0x20EC470", VA = "0x1820EDA70")]
public GcmBlockCipher(IBlockCipher c, IGcmMultiplier m)
{
/*
An exception occurred when decompiling this method (06009885)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.Gcm.IGcmMultiplier)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_49:
stloc:ArgumentException(var_5_5F, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("cipher required with a block size of "), ldloc:int32[exp:object](var_4), ldstr:string[exp:object]("."))))
}
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: 0x1700187A RID: 6266
// (get) Token: 0x06009886 RID: 39046 RVA: 0x0021D20C File Offset: 0x0021B40C
[Token(Token = "0x1700187A")]
public string AlgorithmName
{
[Token(Token = "0x6009886")]
[Address(RVA = "0x20EDEC0", Offset = "0x20EC8C0", VA = "0x1820EDEC0", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/GCM";
}
}
// Token: 0x06009887 RID: 39047 RVA: 0x0021D234 File Offset: 0x0021B434
[Token(Token = "0x6009887")]
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240", Slot = "5")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x06009888 RID: 39048 RVA: 0x0021D248 File Offset: 0x0021B448
[Token(Token = "0x6009888")]
[Address(RVA = "0x11B1BB0", Offset = "0x11B05B0", VA = "0x1811B1BB0", Slot = "7")]
public int GetBlockSize()
{
return 16;
}
// Token: 0x06009889 RID: 39049 RVA: 0x0021D258 File Offset: 0x0021B458
[Token(Token = "0x6009889")]
[Address(RVA = "0x20EC7B0", Offset = "0x20EB1B0", VA = "0x1820EC7B0", Slot = "6")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (06009889)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_291:
stloc:ArgumentException(var_45_29B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Key must be specified in initial init")))
}
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: 0x0600988A RID: 39050 RVA: 0x0021D504 File Offset: 0x0021B704
[Token(Token = "0x600988A")]
[Address(RVA = "0x20EC460", Offset = "0x20EAE60", VA = "0x1820EC460", Slot = "13")]
public byte[] GetMac()
{
byte[] array = this.macBlock;
if (array == 0)
{
}
return Arrays.Clone(array);
}
// Token: 0x0600988B RID: 39051 RVA: 0x0021D524 File Offset: 0x0021B724
[Token(Token = "0x600988B")]
[Address(RVA = "0x20EC690", Offset = "0x20EB090", VA = "0x1820EC690", Slot = "15")]
public int GetOutputSize(int len)
{
int num = this.bufOff;
int num2 = this.macSize;
num += len;
if (this.forEncryption)
{
return num2 + num;
}
if (num < num2)
{
return 0;
}
return num - num2;
}
// Token: 0x0600988C RID: 39052 RVA: 0x0021D560 File Offset: 0x0021B760
[Token(Token = "0x600988C")]
[Address(RVA = "0x20EC6C0", Offset = "0x20EB0C0", VA = "0x1820EC6C0", Slot = "14")]
public int GetUpdateOutputSize(int len)
{
int num = this.bufOff;
num += len;
int num2;
if (!this.forEncryption)
{
num2 = this.macSize;
num -= num2;
}
if (num < num2)
{
num++;
}
return num - num;
}
// Token: 0x0600988D RID: 39053 RVA: 0x0021D59C File Offset: 0x0021B79C
[Token(Token = "0x600988D")]
[Address(RVA = "0x20ECF20", Offset = "0x20EB920", VA = "0x1820ECF20", Slot = "8")]
public void ProcessAadByte(byte input)
{
this.CheckStatus();
byte[] array = this.atBlock;
int num = this.atBlockPos;
int num2 = this.atBlockPos;
num2++;
this.atBlockPos = num2;
if (num2 == 16)
{
byte[] array2 = this.atBlock;
byte[] s_at = this.S_at;
this.gHASHBlock(s_at, array2);
this.atBlockPos = (int)((ulong)0L);
}
}
// Token: 0x0600988E RID: 39054 RVA: 0x0021D5FC File Offset: 0x0021B7FC
[Token(Token = "0x600988E")]
[Address(RVA = "0x20ECFB0", Offset = "0x20EB9B0", VA = "0x1820ECFB0", Slot = "9")]
public void ProcessAadBytes(byte[] inBytes, int inOff, int len)
{
this.CheckStatus();
if (len > 0)
{
int num = 0;
byte[] array = this.atBlock;
int num2 = this.atBlockPos;
int num3 = this.atBlockPos;
num3++;
this.atBlockPos = num3;
if (num3 == 16)
{
byte[] array2 = this.atBlock;
byte[] s_at = this.S_at;
this.gHASHBlock(s_at, array2);
this.atBlockPos = num;
}
num3 = inOff - inOff;
}
}
// Token: 0x0600988F RID: 39055 RVA: 0x0021D670 File Offset: 0x0021B870
[Token(Token = "0x600988F")]
[Address(RVA = "0x20EC6F0", Offset = "0x20EB0F0", VA = "0x1820EC6F0")]
private void InitCipher()
{
if (this.atLength > (ulong)0L)
{
byte[] s_atPre = this.S_atPre;
int num = 0;
byte[] s_at = this.S_at;
int num2 = 0;
ulong num3;
Array.Copy(s_at, num2, s_atPre, num, (int)num3);
ulong num4 = this.atLength;
this.atLengthPre = num4;
}
int num5 = this.atBlockPos;
if (num5 > 0)
{
byte[] array = this.atBlock;
int num6 = 0;
byte[] s_atPre2 = this.S_atPre;
this.gHASHPartial(s_atPre2, array, num6, num5);
}
if (this.atLengthPre != (ulong)0L)
{
byte[] s = this.S;
int num7 = 0;
byte[] s_atPre3 = this.S_atPre;
int num8 = 0;
ulong num9;
Array.Copy(s_atPre3, num8, s, num7, (int)num9);
}
}
// Token: 0x06009890 RID: 39056 RVA: 0x0021D714 File Offset: 0x0021B914
[Token(Token = "0x6009890")]
[Address(RVA = "0x20ED290", Offset = "0x20EBC90", VA = "0x1820ED290", Slot = "10")]
public int ProcessByte(byte input, byte[] output, int outOff)
{
this.CheckStatus();
byte[] array = this.bufBlock;
int num = this.bufOff;
int num2 = this.bufOff;
byte[] array2 = this.bufBlock;
num2++;
this.bufOff = num2;
if (num2 != array2.Length)
{
return 0;
}
int num3 = 0;
int num4 = 0;
this.ProcessBlock(array2, num4, output, outOff);
int num7;
if ((this.forEncryption ? 1 : 0) == num3)
{
byte[] array3 = this.bufBlock;
int num5 = this.macSize;
int num6 = 0;
Array.Copy(array3, 16, array3, num6, num5);
num7 = this.macSize;
}
this.bufOff = num7;
throw new NullReferenceException();
}
// Token: 0x06009891 RID: 39057 RVA: 0x0021D7AC File Offset: 0x0021B9AC
[Token(Token = "0x6009891")]
[Address(RVA = "0x20ED370", Offset = "0x20EBD70", VA = "0x1820ED370", Slot = "11")]
public int ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
{
this.CheckStatus();
Check.DataLength(input, inOff, inOff, "input buffer too short");
int num = 0;
if ((this.forEncryption ? 1 : 0) == num)
{
if (len <= 0)
{
return num;
}
byte[] array = this.bufBlock;
int num2 = this.bufOff;
int num3 = this.bufOff;
byte[] array2 = this.bufBlock;
num3++;
this.bufOff = num3;
if (num3 == array2.Length)
{
byte[] array3 = this.bufBlock;
int num4 = 0;
int num5 = this.macSize;
Array.Copy(array3, 16, array3, num4, num5);
int num6 = this.macSize;
num += 16;
this.bufOff = num6;
}
num3 = inOff - inOff;
}
if (this.bufOff != 0 && len > 0)
{
byte[] array4 = this.bufBlock;
int num7 = this.bufOff;
num7++;
this.bufOff = num7;
if (num7 == 16)
{
this.bufOff = num;
throw new NullReferenceException();
}
}
num += 16;
while (len != 16)
{
}
if (len > 0)
{
byte[] array5 = this.bufBlock;
int num8 = 0;
Array.Copy(input, inOff, array5, num8, len);
this.bufOff = len;
}
return num;
}
// Token: 0x06009892 RID: 39058 RVA: 0x0021D8C4 File Offset: 0x0021BAC4
[Token(Token = "0x6009892")]
[Address(RVA = "0x20EBDE0", Offset = "0x20EA7E0", VA = "0x1820EBDE0", Slot = "12")]
public int DoFinal(byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (06009892)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::DoFinal(System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2FB:
stloc:InvalidCipherTextException(var_58_305, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in GCM failed")))
}
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.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: 0x06009893 RID: 39059 RVA: 0x0021DBD8 File Offset: 0x0021BDD8
[Token(Token = "0x6009893")]
[Address(RVA = "0x20ED780", Offset = "0x20EC180", VA = "0x1820ED780", Slot = "16")]
public void Reset()
{
this.Reset(true);
}
// Token: 0x06009894 RID: 39060 RVA: 0x0021DBEC File Offset: 0x0021BDEC
[Token(Token = "0x6009894")]
[Address(RVA = "0x20ED790", Offset = "0x20EC190", VA = "0x1820ED790")]
private void Reset(bool clearMac)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = new byte[16];
this.S = array;
byte[] array2 = new byte[16];
this.S_at = array2;
byte[] array3 = new byte[16];
this.S_atPre = array3;
byte[] array4 = new byte[16];
byte[] j = this.J0;
int num = 0;
this.atBlockPos = num;
this.atLength = (ulong)num;
this.atLengthPre = (ulong)num;
this.atBlock = array4;
byte[] array5 = Arrays.Clone(j);
byte[] array6 = this.bufBlock;
this.counter = array5;
this.blocksRemaining = (uint)((ulong)4294967294L);
this.bufOff = num;
this.totalLength = (ulong)num;
if (array6 != 0)
{
int num2 = 0;
Arrays.Fill(array6, (byte)num2);
}
if (clearMac)
{
this.macBlock = num;
}
if ((this.forEncryption ? 1 : 0) == num)
{
byte[] array7 = this.initialAssociatedText;
if (array7 != 0)
{
int length = array7.Length;
int num3 = 0;
this.ProcessAadBytes(array7, num3, length);
}
return;
}
}
// Token: 0x06009895 RID: 39061 RVA: 0x0021DCF0 File Offset: 0x0021BEF0
[Token(Token = "0x6009895")]
[Address(RVA = "0x20ED0B0", Offset = "0x20EBAB0", VA = "0x1820ED0B0")]
private void ProcessBlock(byte[] buf, int bufOff, byte[] output, int outOff)
{
if (this.totalLength == (ulong)0L)
{
this.InitCipher();
}
byte[] array = this.ctrBlock;
this.GetNextCtrBlock(array);
if (!this.forEncryption)
{
GcmUtilities.Xor(this.S, buf, bufOff);
IGcmMultiplier gcmMultiplier = this.multiplier;
byte[] array2 = this.ctrBlock;
}
GcmUtilities.Xor(this.ctrBlock, buf, bufOff);
byte[] array3 = this.ctrBlock;
byte[] s = this.S;
this.gHASHBlock(s, array3);
byte[] array4 = this.ctrBlock;
}
// Token: 0x06009896 RID: 39062 RVA: 0x0021DD78 File Offset: 0x0021BF78
[Token(Token = "0x6009896")]
[Address(RVA = "0x20ED640", Offset = "0x20EC040", VA = "0x1820ED640")]
private void ProcessPartial(byte[] buf, int off, int len, byte[] output, int outOff)
{
byte[] array = this.ctrBlock;
this.GetNextCtrBlock(array);
if (!this.forEncryption)
{
byte[] s = this.S;
this.gHASHPartial(s, buf, len, len);
byte[] array2 = this.ctrBlock;
int num = 0;
GcmUtilities.Xor(buf, off, array2, num, len);
}
byte[] array3 = this.ctrBlock;
int num2 = 0;
GcmUtilities.Xor(buf, off, array3, num2, len);
byte[] s2 = this.S;
this.gHASHPartial(s2, buf, off, len);
}
// Token: 0x06009897 RID: 39063 RVA: 0x0021DDF4 File Offset: 0x0021BFF4
[Token(Token = "0x6009897")]
[Address(RVA = "0x20EDDF0", Offset = "0x20EC7F0", VA = "0x1820EDDF0")]
private void gHASH(byte[] Y, byte[] b, int len)
{
int num = 0;
if (len > 0)
{
int num2 = Math.Min(len, 16);
this.gHASHPartial(Y, b, num, num2);
num += 16;
}
}
// Token: 0x06009898 RID: 39064 RVA: 0x0021DE20 File Offset: 0x0021C020
[Token(Token = "0x6009898")]
[Address(RVA = "0x20EDC60", Offset = "0x20EC660", VA = "0x1820EDC60")]
private void gHASHBlock(byte[] Y, byte[] b)
{
GcmUtilities.Xor(Y, b);
IGcmMultiplier gcmMultiplier = this.multiplier;
throw new NullReferenceException();
}
// Token: 0x06009899 RID: 39065 RVA: 0x0021DE40 File Offset: 0x0021C040
[Token(Token = "0x6009899")]
[Address(RVA = "0x20EDBB0", Offset = "0x20EC5B0", VA = "0x1820EDBB0")]
private void gHASHBlock(byte[] Y, byte[] b, int off)
{
GcmUtilities.Xor(Y, b, off);
IGcmMultiplier gcmMultiplier = this.multiplier;
throw new NullReferenceException();
}
// Token: 0x0600989A RID: 39066 RVA: 0x0021DE64 File Offset: 0x0021C064
[Token(Token = "0x600989A")]
[Address(RVA = "0x20EDD00", Offset = "0x20EC700", VA = "0x1820EDD00")]
private void gHASHPartial(byte[] Y, byte[] b, int off, int len)
{
IGcmMultiplier gcmMultiplier = this.multiplier;
throw new NullReferenceException();
}
// Token: 0x0600989B RID: 39067 RVA: 0x0021DE80 File Offset: 0x0021C080
[Token(Token = "0x600989B")]
[Address(RVA = "0x20EC4E0", Offset = "0x20EAEE0", VA = "0x1820EC4E0")]
private void GetNextCtrBlock(byte[] block)
{
/*
An exception occurred when decompiling this method (0600989B)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::GetNextCtrBlock(System.Byte[])
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_9E:
stloc:InvalidOperationException(var_11_A8, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Attempt to process too many blocks")))
}
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: 0x0600989C RID: 39068 RVA: 0x0021DF38 File Offset: 0x0021C138
[Token(Token = "0x600989C")]
[Address(RVA = "0x20EBD40", Offset = "0x20EA740", VA = "0x1820EBD40")]
private void CheckStatus()
{
/*
An exception occurred when decompiling this method (0600989C)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.GcmBlockCipher::CheckStatus()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_13:
stloc:InvalidOperationException(var_0_1D, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("GCM cipher cannot be reused for encryption")))
}
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: 0x04006432 RID: 25650
[Token(Token = "0x4006432")]
private const int BlockSize = 16;
// Token: 0x04006433 RID: 25651
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006433")]
private byte[] ctrBlock;
// Token: 0x04006434 RID: 25652
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006434")]
private readonly IBlockCipher cipher;
// Token: 0x04006435 RID: 25653
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006435")]
private readonly IGcmMultiplier multiplier;
// Token: 0x04006436 RID: 25654
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006436")]
private IGcmExponentiator exp;
// Token: 0x04006437 RID: 25655
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006437")]
private bool forEncryption;
// Token: 0x04006438 RID: 25656
[global::Cpp2IlInjected.FieldOffset(Offset = "0x31")]
[Token(Token = "0x4006438")]
private bool initialised;
// Token: 0x04006439 RID: 25657
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
[Token(Token = "0x4006439")]
private int macSize;
// Token: 0x0400643A RID: 25658
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x400643A")]
private byte[] lastKey;
// Token: 0x0400643B RID: 25659
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x400643B")]
private byte[] nonce;
// Token: 0x0400643C RID: 25660
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x400643C")]
private byte[] initialAssociatedText;
// Token: 0x0400643D RID: 25661
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x400643D")]
private byte[] H;
// Token: 0x0400643E RID: 25662
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x400643E")]
private byte[] J0;
// Token: 0x0400643F RID: 25663
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
[Token(Token = "0x400643F")]
private byte[] bufBlock;
// Token: 0x04006440 RID: 25664
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
[Token(Token = "0x4006440")]
private byte[] macBlock;
// Token: 0x04006441 RID: 25665
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
[Token(Token = "0x4006441")]
private byte[] S;
// Token: 0x04006442 RID: 25666
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
[Token(Token = "0x4006442")]
private byte[] S_at;
// Token: 0x04006443 RID: 25667
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
[Token(Token = "0x4006443")]
private byte[] S_atPre;
// Token: 0x04006444 RID: 25668
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
[Token(Token = "0x4006444")]
private byte[] counter;
// Token: 0x04006445 RID: 25669
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
[Token(Token = "0x4006445")]
private uint blocksRemaining;
// Token: 0x04006446 RID: 25670
[global::Cpp2IlInjected.FieldOffset(Offset = "0x94")]
[Token(Token = "0x4006446")]
private int bufOff;
// Token: 0x04006447 RID: 25671
[global::Cpp2IlInjected.FieldOffset(Offset = "0x98")]
[Token(Token = "0x4006447")]
private ulong totalLength;
// Token: 0x04006448 RID: 25672
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
[Token(Token = "0x4006448")]
private byte[] atBlock;
// Token: 0x04006449 RID: 25673
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA8")]
[Token(Token = "0x4006449")]
private int atBlockPos;
// Token: 0x0400644A RID: 25674
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB0")]
[Token(Token = "0x400644A")]
private ulong atLength;
// Token: 0x0400644B RID: 25675
[global::Cpp2IlInjected.FieldOffset(Offset = "0xB8")]
[Token(Token = "0x400644B")]
private ulong atLengthPre;
}
}
@@ -0,0 +1,82 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x0200165D RID: 5725
[Token(Token = "0x200165D")]
[StructLayout(3)]
public interface IAeadBlockCipher
{
// Token: 0x1700187D RID: 6269
// (get) Token: 0x060098A7 RID: 39079
[Token(Token = "0x1700187D")]
string AlgorithmName
{
[Token(Token = "0x60098A7")]
[Address(Slot = "0")]
get;
}
// Token: 0x060098A8 RID: 39080
[Token(Token = "0x60098A8")]
[Address(Slot = "1")]
IBlockCipher GetUnderlyingCipher();
// Token: 0x060098A9 RID: 39081
[Token(Token = "0x60098A9")]
[Address(Slot = "2")]
void Init(bool forEncryption, ICipherParameters parameters);
// Token: 0x060098AA RID: 39082
[Token(Token = "0x60098AA")]
[Address(Slot = "3")]
int GetBlockSize();
// Token: 0x060098AB RID: 39083
[Token(Token = "0x60098AB")]
[Address(Slot = "4")]
void ProcessAadByte(byte input);
// Token: 0x060098AC RID: 39084
[Token(Token = "0x60098AC")]
[Address(Slot = "5")]
void ProcessAadBytes(byte[] inBytes, int inOff, int len);
// Token: 0x060098AD RID: 39085
[Token(Token = "0x60098AD")]
[Address(Slot = "6")]
int ProcessByte(byte input, byte[] outBytes, int outOff);
// Token: 0x060098AE RID: 39086
[Token(Token = "0x60098AE")]
[Address(Slot = "7")]
int ProcessBytes(byte[] inBytes, int inOff, int len, byte[] outBytes, int outOff);
// Token: 0x060098AF RID: 39087
[Token(Token = "0x60098AF")]
[Address(Slot = "8")]
int DoFinal(byte[] outBytes, int outOff);
// Token: 0x060098B0 RID: 39088
[Token(Token = "0x60098B0")]
[Address(Slot = "9")]
byte[] GetMac();
// Token: 0x060098B1 RID: 39089
[Token(Token = "0x60098B1")]
[Address(Slot = "10")]
int GetUpdateOutputSize(int len);
// Token: 0x060098B2 RID: 39090
[Token(Token = "0x60098B2")]
[Address(Slot = "11")]
int GetOutputSize(int len);
// Token: 0x060098B3 RID: 39091
[Token(Token = "0x60098B3")]
[Address(Slot = "12")]
void Reset();
}
}
@@ -0,0 +1,604 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x0200165E RID: 5726
[Token(Token = "0x200165E")]
[StructLayout(3)]
public class KCcmBlockCipher : IAeadBlockCipher
{
// Token: 0x060098B4 RID: 39092 RVA: 0x0021E2B8 File Offset: 0x0021C4B8
[Token(Token = "0x60098B4")]
[Address(RVA = "0x20F47F0", Offset = "0x20F31F0", VA = "0x1820F47F0")]
private void setNb(int Nb)
{
/*
An exception occurred when decompiling this method (060098B4)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::setNb(System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_0C:
stloc:ArgumentException(var_0_16, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Nb = 4 is recommended by DSTU7624 but can be changed to only 6 or 8 in this implementation")))
}
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: 0x060098B5 RID: 39093 RVA: 0x0021E2DC File Offset: 0x0021C4DC
[Token(Token = "0x60098B5")]
[Address(RVA = "0x20F4350", Offset = "0x20F2D50", VA = "0x1820F4350")]
public KCcmBlockCipher(IBlockCipher engine)
{
}
// Token: 0x060098B6 RID: 39094 RVA: 0x0021E2EC File Offset: 0x0021C4EC
[Token(Token = "0x60098B6")]
[Address(RVA = "0x20F4360", Offset = "0x20F2D60", VA = "0x1820F4360")]
public KCcmBlockCipher(IBlockCipher engine, int Nb)
{
/*
An exception occurred when decompiling this method (060098B6)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_D8:
stloc:ArgumentException(var_10_E2, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Nb = 4 is recommended by DSTU7624 but can be changed to only 6 or 8 in this implementation")))
}
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: 0x060098B7 RID: 39095 RVA: 0x0021E3DC File Offset: 0x0021C5DC
[Token(Token = "0x60098B7")]
[Address(RVA = "0x20F2800", Offset = "0x20F1200", VA = "0x1820F2800", Slot = "17")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (060098B7)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_B9:
stloc:ArgumentException(var_15_C3, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Invalid mac size specified")))
}
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.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.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: 0x1700187E RID: 6270
// (get) Token: 0x060098B8 RID: 39096 RVA: 0x0021E4B0 File Offset: 0x0021C6B0
[Token(Token = "0x1700187E")]
public virtual string AlgorithmName
{
[Token(Token = "0x60098B8")]
[Address(RVA = "0x20F4790", Offset = "0x20F3190", VA = "0x1820F4790", Slot = "18")]
get
{
IBlockCipher blockCipher = this.engine;
return 0 + "/KCCM";
}
}
// Token: 0x060098B9 RID: 39097 RVA: 0x0021E4D8 File Offset: 0x0021C6D8
[Token(Token = "0x60098B9")]
[Address(RVA = "0x20F2750", Offset = "0x20F1150", VA = "0x1820F2750", Slot = "19")]
public virtual int GetBlockSize()
{
IBlockCipher blockCipher = this.engine;
throw new NullReferenceException();
}
// Token: 0x060098BA RID: 39098 RVA: 0x0021E4F4 File Offset: 0x0021C6F4
[Token(Token = "0x60098BA")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "20")]
public virtual IBlockCipher GetUnderlyingCipher()
{
return this.engine;
}
// Token: 0x060098BB RID: 39099 RVA: 0x0021E508 File Offset: 0x0021C708
[Token(Token = "0x60098BB")]
[Address(RVA = "0x20F3330", Offset = "0x20F1D30", VA = "0x1820F3330", Slot = "21")]
public virtual void ProcessAadByte(byte input)
{
((IDisposable)this.associatedText).Dispose();
}
// Token: 0x060098BC RID: 39100 RVA: 0x0021E528 File Offset: 0x0021C728
[Token(Token = "0x60098BC")]
[Address(RVA = "0x20F3360", Offset = "0x20F1D60", VA = "0x1820F3360", Slot = "22")]
public virtual void ProcessAadBytes(byte[] input, int inOff, int len)
{
int num = this.associatedText.Read(input, inOff, len);
}
// Token: 0x060098BD RID: 39101 RVA: 0x0021E54C File Offset: 0x0021C74C
[Token(Token = "0x60098BD")]
[Address(RVA = "0x20F2C90", Offset = "0x20F1690", VA = "0x1820F2C90")]
private void ProcessAAD(byte[] assocText, int assocOff, int assocLen, int dataLen)
{
/*
An exception occurred when decompiling this method (060098BD)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCcmBlockCipher::ProcessAAD(System.Byte[],System.Int32,System.Int32,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_1CD:
stloc:IBlockCipher(var_40_1D3, ldfld:IBlockCipher(KCcmBlockCipher::engine, ldloc:KCcmBlockCipher(this)))
stloc:uint8[](var_41_1DB, ldfld:uint8[](KCcmBlockCipher::macBlock, ldloc:KCcmBlockCipher(this)))
stloc:ArgumentException(var_42_1E7, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("authText buffer too short")))
}
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: 0x060098BE RID: 39102 RVA: 0x0021E744 File Offset: 0x0021C944
[Token(Token = "0x60098BE")]
[Address(RVA = "0x20F3620", Offset = "0x20F2020", VA = "0x1820F3620", Slot = "23")]
public virtual int ProcessByte(byte input, byte[] output, int outOff)
{
MemoryStream memoryStream = this.data;
return 0;
}
// Token: 0x060098BF RID: 39103 RVA: 0x0021E760 File Offset: 0x0021C960
[Token(Token = "0x60098BF")]
[Address(RVA = "0x20F3650", Offset = "0x20F2050", VA = "0x1820F3650", Slot = "24")]
public virtual int ProcessBytes(byte[] input, int inOff, int inLen, byte[] output, int outOff)
{
Check.DataLength(input, inOff, inOff, "input buffer too short");
int num = this.data.ReadByte();
return 0;
}
// Token: 0x060098C0 RID: 39104 RVA: 0x0021E790 File Offset: 0x0021C990
[Token(Token = "0x60098C0")]
[Address(RVA = "0x20F36F0", Offset = "0x20F20F0", VA = "0x1820F36F0")]
public int ProcessPacket(byte[] input, int inOff, int len, byte[] output, int outOff)
{
byte[] array11;
byte[] array12;
do
{
Check.DataLength(input, inOff, inOff, "input buffer too short");
if (this.associatedText.CanWrite > false)
{
MemoryStream memoryStream = this.associatedText;
bool canWrite = this.associatedText.CanWrite;
MemoryStream memoryStream2 = this.data;
if (this.forEncryption)
{
bool canWrite2 = memoryStream2.CanWrite;
}
bool canWrite3 = memoryStream2.CanWrite;
}
IBlockCipher blockCipher = this.engine;
if (this.forEncryption)
{
break;
}
int num = this.macSize;
Check.DataLength(typeof(IBlockCipher).TypeHandle != 0, "partial blocks not supported");
IBlockCipher blockCipher2 = this.engine;
byte[] array = this.s;
int num2 = 0;
IBlockCipher blockCipher3 = this.engine;
if (len > 0)
{
IBlockCipher blockCipher4 = this.engine;
int num3 = 0;
if (num3 < inOff)
{
num3 += num3;
num3++;
}
IBlockCipher blockCipher5 = this.engine;
int num4 = 0;
uint num5;
if (num4 < (int)num5)
{
num4 += num4;
num4++;
}
num2++;
}
byte[] array2 = this.counter;
uint num6;
if (num6 < (uint)array2.Length)
{
byte[] array3 = this.s;
num6 += (uint)1;
byte[] array4 = this.counter;
array4 += array4;
array4 += array4;
}
IBlockCipher blockCipher6 = this.engine;
byte[] array5 = this.buffer;
if (this.macSize > 0)
{
byte[] array6 = this.buffer;
int num7 = this.macSize;
}
byte[] array7 = this.counter;
if (num6 < (uint)array7.Length)
{
byte[] array8 = this.s;
num6 += (uint)1;
if (this.counter != 0)
{
continue;
}
}
IBlockCipher blockCipher7 = this.engine;
byte[] array9 = this.buffer;
int num8 = this.macSize;
int num9 = this.macSize;
int num10 = 0;
byte[] array10 = this.mac;
int num11 = 0;
Array.Copy(this.macBlock, num11, array10, num10, num9);
array11 = new byte[this.macSize];
int num12 = this.macSize;
int num13 = 0;
int num14 = 0;
Array.Copy(this.buffer, num13, array11, num14, num12);
array12 = this.mac;
}
while (!Arrays.ConstantTimeAreEqual(array12, array11));
Check.DataLength(typeof(IBlockCipher).TypeHandle != 0, "partial blocks not supported");
int num18;
if (len > 0)
{
int num15 = 0;
if (num15 < array12)
{
num15 += num15;
num15++;
}
int num16 = 0;
uint num17;
if (num16 < (int)num17)
{
num16 += num16;
num16++;
}
array12 += num16;
num18 = 0;
uint num19;
if (num18 < (int)num19)
{
num18 += num18;
num18++;
}
}
uint num20;
num20 += (uint)1;
while (num18 != 0)
{
}
num18 += num18;
num18 += 2;
num18 += 19;
num18 += num18;
num18 += 2;
num18 += 19;
num18 += num18;
num18 += 2;
num18 += 19;
if (num18 > 0)
{
num20 += (uint)1;
}
num20 += (uint)len;
throw new IndexOutOfRangeException();
}
// Token: 0x060098C1 RID: 39105 RVA: 0x0021EA5C File Offset: 0x0021CC5C
[Token(Token = "0x60098C1")]
[Address(RVA = "0x20F3390", Offset = "0x20F1D90", VA = "0x1820F3390")]
private void ProcessBlock(byte[] input, int inOff, int len, byte[] output, int outOff)
{
do
{
byte[] array = this.counter;
int num = 0;
if (num < array.Length)
{
byte[] array2 = this.s;
num++;
byte[] array3 = this.counter;
}
IBlockCipher blockCipher = this.engine;
byte[] array4 = this.buffer;
IBlockCipher blockCipher2 = this.engine;
int num2 = 0;
if (num2 < blockCipher)
{
num2 += num2;
num2++;
}
if (num2 >= num2)
{
return;
}
byte[] array5 = this.buffer;
}
while (this.engine != 0);
byte b;
b += b;
}
// Token: 0x060098C2 RID: 39106 RVA: 0x0021EAE0 File Offset: 0x0021CCE0
[Token(Token = "0x60098C2")]
[Address(RVA = "0x20F2530", Offset = "0x20F0F30", VA = "0x1820F2530")]
private void CalculateMac(byte[] authText, int authOff, int len)
{
if (len > 0)
{
int num = 0;
IBlockCipher blockCipher = this.engine;
byte[] array = this.macBlock;
num += array;
num++;
IBlockCipher blockCipher2 = this.engine;
byte[] array2 = this.macBlock;
IBlockCipher blockCipher3 = this.engine;
IBlockCipher blockCipher4 = this.engine;
}
}
// Token: 0x060098C3 RID: 39107 RVA: 0x0021EB30 File Offset: 0x0021CD30
[Token(Token = "0x60098C3")]
[Address(RVA = "0x20F26A0", Offset = "0x20F10A0", VA = "0x1820F26A0", Slot = "25")]
public virtual int DoFinal(byte[] output, int outOff)
{
MemoryStream memoryStream = this.data;
bool canWrite = this.data.CanWrite;
return outOff;
}
// Token: 0x060098C4 RID: 39108 RVA: 0x0021EB58 File Offset: 0x0021CD58
[Token(Token = "0x60098C4")]
[Address(RVA = "0x20F27A0", Offset = "0x20F11A0", VA = "0x1820F27A0", Slot = "26")]
public virtual byte[] GetMac()
{
return Arrays.Clone(this.mac);
}
// Token: 0x060098C5 RID: 39109 RVA: 0x0021EB70 File Offset: 0x0021CD70
[Token(Token = "0x60098C5")]
[Address(RVA = "0x4577C0", Offset = "0x4561C0", VA = "0x1804577C0", Slot = "27")]
public virtual int GetUpdateOutputSize(int len)
{
return len;
}
// Token: 0x060098C6 RID: 39110 RVA: 0x0021EB80 File Offset: 0x0021CD80
[Token(Token = "0x60098C6")]
[Address(RVA = "0x20E8770", Offset = "0x20E7170", VA = "0x1820E8770", Slot = "28")]
public virtual int GetOutputSize(int len)
{
int num = this.macSize;
return num + len;
}
// Token: 0x060098C7 RID: 39111 RVA: 0x0021EB9C File Offset: 0x0021CD9C
[Token(Token = "0x60098C7")]
[Address(RVA = "0x20F41B0", Offset = "0x20F2BB0", VA = "0x1820F41B0", Slot = "29")]
public virtual void Reset()
{
byte[] g = this.G1;
int num = 0;
Arrays.Fill(g, (byte)num);
byte[] array = this.buffer;
int num2 = 0;
Arrays.Fill(array, (byte)num2);
byte[] array2 = this.counter;
int num3 = 0;
Arrays.Fill(array2, (byte)num3);
byte[] array3 = this.macBlock;
int num4 = 0;
Arrays.Fill(array3, (byte)num4);
byte[] array4 = this.counter;
MemoryStream memoryStream = this.data;
MemoryStream memoryStream2 = this.associatedText;
byte[] array5 = this.initialAssociatedText;
if (array5 != 0)
{
this.ProcessAadByte(array5);
}
}
// Token: 0x060098C8 RID: 39112 RVA: 0x0021EC24 File Offset: 0x0021CE24
[Token(Token = "0x60098C8")]
[Address(RVA = "0x20EBCA0", Offset = "0x20EA6A0", VA = "0x1820EBCA0")]
private void intToBytes(int num, byte[] outBytes, int outOff)
{
int num2 = outOff + 1;
}
// Token: 0x060098C9 RID: 39113 RVA: 0x0021EC3C File Offset: 0x0021CE3C
[Token(Token = "0x60098C9")]
[Address(RVA = "0x20F45B0", Offset = "0x20F2FB0", VA = "0x1820F45B0")]
private byte getFlag(bool authTextPresents, int macSize)
{
StringBuilder stringBuilder = new StringBuilder();
if (authTextPresents)
{
}
StringBuilder stringBuilder2 = stringBuilder.Append("0");
if (macSize > 16)
{
if (macSize == 32)
{
}
if (macSize == 48)
{
}
if (macSize != 64)
{
goto IL_3F;
}
}
if (macSize == 8)
{
}
if (macSize == 16)
{
StringBuilder stringBuilder3 = stringBuilder.Append("011");
}
IL_3F:
string text = Convert.ToString(this.Nb_ - 1, 2);
int num2;
if (text.m_stringLength < 4)
{
StringBuilder stringBuilder4 = new StringBuilder(text);
int num = 0;
num2 = stringBuilder4.Insert(num, "0").GetHashCode();
}
num2 = stringBuilder.GetHashCode();
throw new NullReferenceException();
}
// Token: 0x04006456 RID: 25686
[Token(Token = "0x4006456")]
private static readonly int BYTES_IN_INT;
// Token: 0x04006457 RID: 25687
[Token(Token = "0x4006457")]
private static readonly int BITS_IN_BYTE;
// Token: 0x04006458 RID: 25688
[Token(Token = "0x4006458")]
private static readonly int MAX_MAC_BIT_LENGTH;
// Token: 0x04006459 RID: 25689
[Token(Token = "0x4006459")]
private static readonly int MIN_MAC_BIT_LENGTH;
// Token: 0x0400645A RID: 25690
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400645A")]
private IBlockCipher engine;
// Token: 0x0400645B RID: 25691
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400645B")]
private int macSize;
// Token: 0x0400645C RID: 25692
[global::Cpp2IlInjected.FieldOffset(Offset = "0x1C")]
[Token(Token = "0x400645C")]
private bool forEncryption;
// Token: 0x0400645D RID: 25693
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x400645D")]
private byte[] initialAssociatedText;
// Token: 0x0400645E RID: 25694
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x400645E")]
private byte[] mac;
// Token: 0x0400645F RID: 25695
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x400645F")]
private byte[] macBlock;
// Token: 0x04006460 RID: 25696
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006460")]
private byte[] nonce;
// Token: 0x04006461 RID: 25697
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4006461")]
private byte[] G1;
// Token: 0x04006462 RID: 25698
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x4006462")]
private byte[] buffer;
// Token: 0x04006463 RID: 25699
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x4006463")]
private byte[] s;
// Token: 0x04006464 RID: 25700
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x4006464")]
private byte[] counter;
// Token: 0x04006465 RID: 25701
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
[Token(Token = "0x4006465")]
private readonly MemoryStream associatedText;
// Token: 0x04006466 RID: 25702
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
[Token(Token = "0x4006466")]
private readonly MemoryStream data;
// Token: 0x04006467 RID: 25703
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
[Token(Token = "0x4006467")]
private int Nb_;
}
}
@@ -0,0 +1,242 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x0200165F RID: 5727
[Token(Token = "0x200165F")]
[StructLayout(3)]
public class KCtrBlockCipher : IStreamCipher, IBlockCipher
{
// Token: 0x060098CB RID: 39115 RVA: 0x0021ECE0 File Offset: 0x0021CEE0
[Token(Token = "0x60098CB")]
[Address(RVA = "0x20F5120", Offset = "0x20F3B20", VA = "0x1820F5120")]
public KCtrBlockCipher(IBlockCipher cipher)
{
this.checkCounter();
this.cipher = cipher;
byte[] array = new byte[0];
this.IV = array;
this.blockSize = array;
byte[] array2 = new byte[array];
this.ofbV = array2;
byte[] array3 = new byte[array2];
this.ofbOutV = array3;
}
// Token: 0x060098CC RID: 39116 RVA: 0x0021ED34 File Offset: 0x0021CF34
[Token(Token = "0x60098CC")]
[Address(RVA = "0x3EE8E0", Offset = "0x3ED2E0", VA = "0x1803EE8E0")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x060098CD RID: 39117 RVA: 0x0021ED48 File Offset: 0x0021CF48
[Token(Token = "0x60098CD")]
[Address(RVA = "0x20F4A30", Offset = "0x20F3430", VA = "0x1820F4A30", Slot = "10")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (060098CD)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.KCtrBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_95:
stloc:ArgumentException(var_14_9F, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Invalid parameter passed")))
}
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: 0x1700187F RID: 6271
// (get) Token: 0x060098CE RID: 39118 RVA: 0x0021EDF8 File Offset: 0x0021CFF8
[Token(Token = "0x1700187F")]
public string AlgorithmName
{
[Token(Token = "0x60098CE")]
[Address(RVA = "0x20F5200", Offset = "0x20F3C00", VA = "0x1820F5200", Slot = "9")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/KCTR";
}
}
// Token: 0x17001880 RID: 6272
// (get) Token: 0x060098CF RID: 39119 RVA: 0x0021EE20 File Offset: 0x0021D020
[Token(Token = "0x17001880")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x60098CF")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "12")]
get
{
return true;
}
}
// Token: 0x060098D0 RID: 39120 RVA: 0x0021EE30 File Offset: 0x0021D030
[Token(Token = "0x60098D0")]
[Address(RVA = "0x20F49E0", Offset = "0x20F33E0", VA = "0x1820F49E0", Slot = "11")]
public int GetBlockSize()
{
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x060098D1 RID: 39121 RVA: 0x0021EE4C File Offset: 0x0021D04C
[Token(Token = "0x60098D1")]
[Address(RVA = "0x20F5110", Offset = "0x20F3B10", VA = "0x1820F5110", Slot = "6")]
public byte ReturnByte(byte input)
{
return this.CalculateByte(input);
}
// Token: 0x060098D2 RID: 39122 RVA: 0x0021EE60 File Offset: 0x0021D060
[Token(Token = "0x60098D2")]
[Address(RVA = "0x20F4F20", Offset = "0x20F3920", VA = "0x1820F4F20", Slot = "7")]
public void ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
{
byte b2;
byte b = this.CalculateByte(b2);
}
// Token: 0x060098D3 RID: 39123 RVA: 0x0021EE7C File Offset: 0x0021D07C
[Token(Token = "0x60098D3")]
[Address(RVA = "0x20F4870", Offset = "0x20F3270", VA = "0x1820F4870")]
protected byte CalculateByte(byte b)
{
int num = this.byteCount;
if (num != 0)
{
byte[] array = this.ofbOutV;
int num2 = num + 1;
this.byteCount = num2;
byte[] array2 = this.ofbV;
if (num2 == array2.Length)
{
int num3 = 0;
this.byteCount = num3;
}
byte b2;
return b2;
}
byte[] array3 = this.ofbV;
int num4 = 0;
if (num4 < array3.Length)
{
num4++;
if (num4 == array3.Length)
{
byte[] array4 = this.ofbV;
}
}
IBlockCipher blockCipher = this.cipher;
byte[] array5 = this.ofbOutV;
int num5 = this.byteCount;
byte[] array6 = this.ofbOutV;
int num6 = num5 + 1;
this.byteCount = num6;
byte b3;
return b3;
}
// Token: 0x060098D4 RID: 39124 RVA: 0x0021EF30 File Offset: 0x0021D130
[Token(Token = "0x60098D4")]
[Address(RVA = "0x20F4C50", Offset = "0x20F3650", VA = "0x1820F4C50", Slot = "13")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
IBlockCipher blockCipher = this.cipher;
int num = input.Length;
num -= inOff;
IBlockCipher blockCipher2 = this.cipher;
int length = output.Length;
IBlockCipher blockCipher3 = this.cipher;
byte b2;
byte b = this.CalculateByte(b2);
this.ofbOutV = b;
IBlockCipher blockCipher4 = this.cipher;
throw new NullReferenceException();
}
// Token: 0x060098D5 RID: 39125 RVA: 0x0021EF84 File Offset: 0x0021D184
[Token(Token = "0x60098D5")]
[Address(RVA = "0x20F5080", Offset = "0x20F3A80", VA = "0x1820F5080", Slot = "14")]
public void Reset()
{
if (this.initialised)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.ofbV;
}
IBlockCipher blockCipher2 = this.cipher;
this.byteCount = (int)((ulong)0L);
}
// Token: 0x060098D6 RID: 39126 RVA: 0x0021EFC0 File Offset: 0x0021D1C0
[Token(Token = "0x60098D6")]
[Address(RVA = "0x20F5260", Offset = "0x20F3C60", VA = "0x1820F5260")]
private void incrementCounterAt(int pos)
{
byte[] array = this.ofbV;
if (pos < array.Length && pos == array.Length)
{
byte[] array2 = this.ofbV;
}
}
// Token: 0x060098D7 RID: 39127 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x60098D7")]
[Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60")]
private void checkCounter()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x04006468 RID: 25704
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006468")]
private byte[] IV;
// Token: 0x04006469 RID: 25705
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006469")]
private byte[] ofbV;
// Token: 0x0400646A RID: 25706
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x400646A")]
private byte[] ofbOutV;
// Token: 0x0400646B RID: 25707
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x400646B")]
private bool initialised;
// Token: 0x0400646C RID: 25708
[global::Cpp2IlInjected.FieldOffset(Offset = "0x2C")]
[Token(Token = "0x400646C")]
private int byteCount;
// Token: 0x0400646D RID: 25709
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x400646D")]
private readonly int blockSize;
// Token: 0x0400646E RID: 25710
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x400646E")]
private readonly IBlockCipher cipher;
}
}
@@ -0,0 +1,632 @@
using System;
using System.Collections;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001660 RID: 5728
[Token(Token = "0x2001660")]
[StructLayout(3)]
public class OcbBlockCipher : IAeadBlockCipher
{
// Token: 0x060098D8 RID: 39128 RVA: 0x0021EFF4 File Offset: 0x0021D1F4
[Token(Token = "0x60098D8")]
[Address(RVA = "0x20F75B0", Offset = "0x20F5FB0", VA = "0x1820F75B0")]
public OcbBlockCipher(IBlockCipher hashCipher, IBlockCipher mainCipher)
{
/*
An exception occurred when decompiling this method (060098D8)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::.ctor(BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.IBlockCipher)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_68:
stloc:ArgumentException(var_5_72, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("'hashCipher' and 'mainCipher' must be the same algorithm")))
}
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: 0x060098D9 RID: 39129 RVA: 0x0021F074 File Offset: 0x0021D274
[Token(Token = "0x60098D9")]
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240", Slot = "17")]
public virtual IBlockCipher GetUnderlyingCipher()
{
return this.mainCipher;
}
// Token: 0x17001881 RID: 6273
// (get) Token: 0x060098DA RID: 39130 RVA: 0x0021F088 File Offset: 0x0021D288
[Token(Token = "0x17001881")]
public virtual string AlgorithmName
{
[Token(Token = "0x60098DA")]
[Address(RVA = "0x20F7840", Offset = "0x20F6240", VA = "0x1820F7840", Slot = "18")]
get
{
IBlockCipher blockCipher = this.mainCipher;
return 0 + "/OCB";
}
}
// Token: 0x060098DB RID: 39131 RVA: 0x0021F0B0 File Offset: 0x0021D2B0
[Token(Token = "0x60098DB")]
[Address(RVA = "0x20F6150", Offset = "0x20F4B50", VA = "0x1820F6150", Slot = "19")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (060098DB)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_1DF:
stloc:ArgumentException(var_42_1E9, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("cannot change encrypting state without providing 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.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: 0x060098DC RID: 39132 RVA: 0x0021F2A8 File Offset: 0x0021D4A8
[Token(Token = "0x60098DC")]
[Address(RVA = "0x20F6F50", Offset = "0x20F5950", VA = "0x1820F6F50", Slot = "20")]
protected virtual int ProcessNonce(byte[] N)
{
byte[] array = new byte[16];
int length = N.Length;
int num = 0;
int num2 = array.Length;
num2 -= length;
int num3 = 0;
Array.Copy(N, num3, array, num2, length);
int num4 = this.macSize;
array[0] = (byte)num4;
byte b = array[1];
array[1] = b;
byte[] ktopInput = this.KtopInput;
if (ktopInput == 0 || !Arrays.AreEqual(array, ktopInput))
{
byte[] array2 = new byte[16];
IBlockCipher blockCipher = this.hashCipher;
this.KtopInput = array;
byte[] stretch = this.Stretch;
int num5 = 0;
int num6 = 0;
ulong num7;
Array.Copy(array2, num6, stretch, num5, (int)num7);
int length2 = array2.Length;
byte[] stretch2 = this.Stretch;
num++;
}
throw new NullReferenceException();
}
// Token: 0x060098DD RID: 39133 RVA: 0x0021F370 File Offset: 0x0021D570
[Token(Token = "0x60098DD")]
[Address(RVA = "0x11B1BB0", Offset = "0x11B05B0", VA = "0x1811B1BB0", Slot = "21")]
public virtual int GetBlockSize()
{
return 16;
}
// Token: 0x060098DE RID: 39134 RVA: 0x0021F380 File Offset: 0x0021D580
[Token(Token = "0x60098DE")]
[Address(RVA = "0x20F6070", Offset = "0x20F4A70", VA = "0x1820F6070", Slot = "22")]
public virtual byte[] GetMac()
{
byte[] array = this.macBlock;
if (array == 0)
{
}
return Arrays.Clone(array);
}
// Token: 0x060098DF RID: 39135 RVA: 0x0021F3A0 File Offset: 0x0021D5A0
[Token(Token = "0x60098DF")]
[Address(RVA = "0x20F60F0", Offset = "0x20F4AF0", VA = "0x1820F60F0", Slot = "23")]
public virtual int GetOutputSize(int len)
{
int num = this.mainBlockPos;
int num2 = this.macSize;
num += len;
if (this.forEncryption)
{
return num2 + num;
}
if (num < num2)
{
return 0;
}
return num - num2;
}
// Token: 0x060098E0 RID: 39136 RVA: 0x0021F3DC File Offset: 0x0021D5DC
[Token(Token = "0x60098E0")]
[Address(RVA = "0x20F6120", Offset = "0x20F4B20", VA = "0x1820F6120", Slot = "24")]
public virtual int GetUpdateOutputSize(int len)
{
int num = this.mainBlockPos;
num += len;
int num2;
if (!this.forEncryption)
{
num2 = this.macSize;
num -= num2;
}
if (num < num2)
{
num++;
}
return num - num;
}
// Token: 0x060098E1 RID: 39137 RVA: 0x0021F418 File Offset: 0x0021D618
[Token(Token = "0x60098E1")]
[Address(RVA = "0x20F6960", Offset = "0x20F5360", VA = "0x1820F6960", Slot = "25")]
public virtual void ProcessAadByte(byte input)
{
byte[] array = this.hashBlock;
int num = this.hashBlockPos;
int num2 = this.hashBlockPos;
byte[] array2 = this.hashBlock;
num2++;
this.hashBlockPos = num2;
if (num2 == array2.Length)
{
string algorithmName = ((IAeadBlockCipher)this).AlgorithmName;
return;
}
}
// Token: 0x060098E2 RID: 39138 RVA: 0x0021F464 File Offset: 0x0021D664
[Token(Token = "0x60098E2")]
[Address(RVA = "0x20F69D0", Offset = "0x20F53D0", VA = "0x1820F69D0", Slot = "26")]
public virtual void ProcessAadBytes(byte[] input, int off, int len)
{
if (len > 0)
{
byte[] array = this.hashBlock;
int num = this.hashBlockPos;
int num2 = this.hashBlockPos;
byte[] array2 = this.hashBlock;
num2++;
this.hashBlockPos = num2;
if (num2 == array2.Length)
{
}
num2 = off - off;
}
}
// Token: 0x060098E3 RID: 39139 RVA: 0x0021F4B4 File Offset: 0x0021D6B4
[Token(Token = "0x60098E3")]
[Address(RVA = "0x20F6AB0", Offset = "0x20F54B0", VA = "0x1820F6AB0", Slot = "27")]
public virtual int ProcessByte(byte input, byte[] output, int outOff)
{
byte[] array = this.mainBlock;
int num = this.mainBlockPos;
int num2 = this.mainBlockPos;
byte[] array2 = this.mainBlock;
num2++;
this.mainBlockPos = num2;
if (num2 != array2.Length)
{
return 0;
}
this.ProcessHashBlock();
return 16;
}
// Token: 0x060098E4 RID: 39140 RVA: 0x0021F504 File Offset: 0x0021D704
[Token(Token = "0x60098E4")]
[Address(RVA = "0x20F6B30", Offset = "0x20F5530", VA = "0x1820F6B30", Slot = "28")]
public virtual int ProcessBytes(byte[] input, int inOff, int len, byte[] output, int outOff)
{
int num = 0;
if (len > 0)
{
byte[] array = this.mainBlock;
int num2 = this.mainBlockPos;
int num3 = this.mainBlockPos;
byte[] array2 = this.mainBlock;
num3++;
this.mainBlockPos = num3;
if (num3 == array2.Length)
{
this.ProcessHashBlock();
num += 16;
}
num3 = inOff - inOff;
}
return num;
}
// Token: 0x060098E5 RID: 39141 RVA: 0x0021F56C File Offset: 0x0021D76C
[Token(Token = "0x60098E5")]
[Address(RVA = "0x20F58F0", Offset = "0x20F42F0", VA = "0x1820F58F0", Slot = "29")]
public virtual int DoFinal(byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (060098E5)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.OcbBlockCipher::DoFinal(System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_205:
stloc:InvalidCipherTextException(var_40_20F, newobj:InvalidCipherTextException(InvalidCipherTextException::.ctor, ldstr:string("mac check in OCB failed")))
}
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.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: 0x060098E6 RID: 39142 RVA: 0x0021F78C File Offset: 0x0021D98C
[Token(Token = "0x60098E6")]
[Address(RVA = "0x20F7300", Offset = "0x20F5D00", VA = "0x1820F7300", Slot = "30")]
public virtual void Reset()
{
string algorithmName = ((IAeadBlockCipher)this).AlgorithmName;
}
// Token: 0x060098E7 RID: 39143 RVA: 0x0021F7A0 File Offset: 0x0021D9A0
[Token(Token = "0x60098E7")]
[Address(RVA = "0x20F58D0", Offset = "0x20F42D0", VA = "0x1820F58D0", Slot = "31")]
protected virtual void Clear(byte[] bs)
{
if (bs != 0)
{
int length = bs.Length;
int num = 0;
Array.Clear(bs, num, length);
return;
}
}
// Token: 0x060098E8 RID: 39144 RVA: 0x0021F7C4 File Offset: 0x0021D9C4
[Token(Token = "0x60098E8")]
[Address(RVA = "0x20F5D70", Offset = "0x20F4770", VA = "0x1820F5D70", Slot = "32")]
protected virtual byte[] GetLSub(int n)
{
int num;
int num4;
do
{
IList l = this.L;
num = 0;
num += num;
num++;
IList l2 = this.L;
uint num2;
if (num < (int)num2)
{
num += num;
num++;
}
uint num3;
if (num < (int)num3)
{
num += num;
num++;
}
num4 = 0;
if (num == 0)
{
num++;
num += 19;
num++;
num += 19;
num += 19;
}
}
while (num == 0);
if (num < num4)
{
num += num;
num++;
}
IList l3 = this.L;
byte[] array;
array += array;
byte b;
return b;
}
// Token: 0x060098E9 RID: 39145 RVA: 0x0021F844 File Offset: 0x0021DA44
[Token(Token = "0x60098E9")]
[Address(RVA = "0x20F6C30", Offset = "0x20F5630", VA = "0x1820F6C30", Slot = "33")]
protected virtual void ProcessHashBlock()
{
long num = this.hashBlockCount;
this.hashBlockCount = num;
int num2 = 0;
num2++;
this.hashBlockPos = (int)((ulong)0L);
}
// Token: 0x060098EA RID: 39146 RVA: 0x0021F870 File Offset: 0x0021DA70
[Token(Token = "0x60098EA")]
[Address(RVA = "0x20F6CA0", Offset = "0x20F56A0", VA = "0x1820F6CA0", Slot = "34")]
protected virtual void ProcessMainBlock(byte[] output, int outOff)
{
int num = 0;
Check.DataLength(output, outOff, 16, "Output buffer too short");
if ((this.forEncryption ? 1 : 0) != num)
{
byte[] array = this.mainBlock;
OcbBlockCipher.Xor(this.Checksum, array);
this.mainBlockPos = num;
}
long num2 = this.mainBlockCount;
byte[] offsetMAIN = this.OffsetMAIN;
this.mainBlockCount = num2;
if ((this.forEncryption ? 1 : 0) != num)
{
num++;
}
byte[] array2 = this.mainBlock;
byte[] offsetMAIN2 = this.OffsetMAIN;
IBlockCipher blockCipher = this.mainCipher;
byte[] array3 = this.mainBlock;
byte[] array4 = this.mainBlock;
byte[] offsetMAIN3 = this.OffsetMAIN;
byte[] array5 = this.mainBlock;
int num3 = 0;
ulong num4;
Array.Copy(array5, num3, output, outOff, (int)num4);
if ((this.forEncryption ? 1 : 0) == num)
{
byte[] array6 = this.mainBlock;
OcbBlockCipher.Xor(this.Checksum, array6);
byte[] array7 = this.mainBlock;
int num5 = 0;
int num6 = this.macSize;
Array.Copy(array7, 16, array7, num5, num6);
int num7 = this.macSize;
this.mainBlockPos = num7;
}
}
// Token: 0x060098EB RID: 39147 RVA: 0x0021F970 File Offset: 0x0021DB70
[Token(Token = "0x60098EB")]
[Address(RVA = "0x20F7190", Offset = "0x20F5B90", VA = "0x1820F7190", Slot = "35")]
protected virtual void Reset(bool clearMac)
{
IBlockCipher blockCipher = this.hashCipher;
IBlockCipher blockCipher2 = this.mainCipher;
this.Reset();
this.Reset();
int num = 0;
this.hashBlockPos = num;
this.hashBlockCount = (long)num;
this.mainBlockCount = (long)num;
this.Reset();
this.Reset();
byte[] offsetMAIN = this.OffsetMAIN;
int num2 = 0;
byte[] offsetMAIN_ = this.OffsetMAIN_0;
int num3 = 0;
ulong num4;
Array.Copy(offsetMAIN_, num3, offsetMAIN, num2, (int)num4);
this.Reset();
if (clearMac)
{
this.macBlock = num;
}
byte[] array = this.initialAssociatedText;
if (array != 0)
{
this.ProcessAadByte(array);
}
}
// Token: 0x060098EC RID: 39148 RVA: 0x0021FA0C File Offset: 0x0021DC0C
[Token(Token = "0x60098EC")]
[Address(RVA = "0x20F73A0", Offset = "0x20F5DA0", VA = "0x1820F73A0", Slot = "36")]
protected virtual void UpdateHASH(byte[] LSub)
{
byte[] offsetHASH = this.OffsetHASH;
byte[] offsetHASH2 = this.OffsetHASH;
byte[] array = this.hashBlock;
IBlockCipher blockCipher = this.hashCipher;
byte[] array2 = this.hashBlock;
byte[] sum = this.Sum;
byte[] array3 = this.hashBlock;
}
// Token: 0x060098ED RID: 39149 RVA: 0x0021FA58 File Offset: 0x0021DC58
[Token(Token = "0x60098ED")]
[Address(RVA = "0x20F67D0", Offset = "0x20F51D0", VA = "0x1820F67D0")]
protected static byte[] OCB_double(byte[] block)
{
byte[] array = new byte[16];
byte b;
b += b;
uint num;
num -= (uint)b;
return array;
}
// Token: 0x060098EE RID: 39150 RVA: 0x0021FA7C File Offset: 0x0021DC7C
[Token(Token = "0x60098EE")]
[Address(RVA = "0x20F68C0", Offset = "0x20F52C0", VA = "0x1820F68C0")]
protected static void OCB_extend(byte[] block, int pos)
{
int num = pos + 1;
if (num < 16)
{
num++;
}
}
// Token: 0x060098EF RID: 39151 RVA: 0x0021FA9C File Offset: 0x0021DC9C
[Token(Token = "0x60098EF")]
[Address(RVA = "0x20F6930", Offset = "0x20F5330", VA = "0x1820F6930")]
protected static int OCB_ntz(long x)
{
int num = 0;
return num + 1;
}
// Token: 0x060098F0 RID: 39152 RVA: 0x0021FAB4 File Offset: 0x0021DCB4
[Token(Token = "0x60098F0")]
[Address(RVA = "0x20F7320", Offset = "0x20F5D20", VA = "0x1820F7320")]
protected static int ShiftLeft(byte[] block, byte[] output)
{
byte b;
b += b;
throw new NullReferenceException();
}
// Token: 0x060098F1 RID: 39153 RVA: 0x0021FACC File Offset: 0x0021DCCC
[Token(Token = "0x60098F1")]
[Address(RVA = "0x20F7540", Offset = "0x20F5F40", VA = "0x1820F7540")]
protected static void Xor(byte[] block, byte[] val)
{
}
// Token: 0x0400646F RID: 25711
[Token(Token = "0x400646F")]
private const int BLOCK_SIZE = 16;
// Token: 0x04006470 RID: 25712
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006470")]
private readonly IBlockCipher hashCipher;
// Token: 0x04006471 RID: 25713
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006471")]
private readonly IBlockCipher mainCipher;
// Token: 0x04006472 RID: 25714
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006472")]
private bool forEncryption;
// Token: 0x04006473 RID: 25715
[global::Cpp2IlInjected.FieldOffset(Offset = "0x24")]
[Token(Token = "0x4006473")]
private int macSize;
// Token: 0x04006474 RID: 25716
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006474")]
private byte[] initialAssociatedText;
// Token: 0x04006475 RID: 25717
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006475")]
private IList L;
// Token: 0x04006476 RID: 25718
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006476")]
private byte[] L_Asterisk;
// Token: 0x04006477 RID: 25719
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x4006477")]
private byte[] L_Dollar;
// Token: 0x04006478 RID: 25720
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x4006478")]
private byte[] KtopInput;
// Token: 0x04006479 RID: 25721
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x4006479")]
private byte[] Stretch;
// Token: 0x0400647A RID: 25722
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x400647A")]
private byte[] OffsetMAIN_0;
// Token: 0x0400647B RID: 25723
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
[Token(Token = "0x400647B")]
private byte[] hashBlock;
// Token: 0x0400647C RID: 25724
[global::Cpp2IlInjected.FieldOffset(Offset = "0x68")]
[Token(Token = "0x400647C")]
private byte[] mainBlock;
// Token: 0x0400647D RID: 25725
[global::Cpp2IlInjected.FieldOffset(Offset = "0x70")]
[Token(Token = "0x400647D")]
private int hashBlockPos;
// Token: 0x0400647E RID: 25726
[global::Cpp2IlInjected.FieldOffset(Offset = "0x74")]
[Token(Token = "0x400647E")]
private int mainBlockPos;
// Token: 0x0400647F RID: 25727
[global::Cpp2IlInjected.FieldOffset(Offset = "0x78")]
[Token(Token = "0x400647F")]
private long hashBlockCount;
// Token: 0x04006480 RID: 25728
[global::Cpp2IlInjected.FieldOffset(Offset = "0x80")]
[Token(Token = "0x4006480")]
private long mainBlockCount;
// Token: 0x04006481 RID: 25729
[global::Cpp2IlInjected.FieldOffset(Offset = "0x88")]
[Token(Token = "0x4006481")]
private byte[] OffsetHASH;
// Token: 0x04006482 RID: 25730
[global::Cpp2IlInjected.FieldOffset(Offset = "0x90")]
[Token(Token = "0x4006482")]
private byte[] Sum;
// Token: 0x04006483 RID: 25731
[global::Cpp2IlInjected.FieldOffset(Offset = "0x98")]
[Token(Token = "0x4006483")]
private byte[] OffsetMAIN;
// Token: 0x04006484 RID: 25732
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA0")]
[Token(Token = "0x4006484")]
private byte[] Checksum;
// Token: 0x04006485 RID: 25733
[global::Cpp2IlInjected.FieldOffset(Offset = "0xA8")]
[Token(Token = "0x4006485")]
private byte[] macBlock;
}
}
@@ -0,0 +1,172 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001661 RID: 5729
[Token(Token = "0x2001661")]
[StructLayout(3)]
public class OfbBlockCipher : IBlockCipher
{
// Token: 0x060098F2 RID: 39154 RVA: 0x0021FAE0 File Offset: 0x0021DCE0
[Token(Token = "0x60098F2")]
[Address(RVA = "0x1DDB610", Offset = "0x1DDA010", VA = "0x181DDB610")]
public OfbBlockCipher(IBlockCipher cipher, int blockSize)
{
this.cipher = cipher;
this.blockSize = blockSize;
byte[] array = new byte[blockSize];
this.IV = array;
byte[] array2 = new byte[array];
this.ofbV = array2;
byte[] array3 = new byte[array2];
this.ofbOutV = array3;
}
// Token: 0x060098F3 RID: 39155 RVA: 0x0021FB34 File Offset: 0x0021DD34
[Token(Token = "0x60098F3")]
[Address(RVA = "0x3C1250", Offset = "0x3BFC50", VA = "0x1803C1250")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x060098F4 RID: 39156 RVA: 0x0021FB48 File Offset: 0x0021DD48
[Token(Token = "0x60098F4")]
[Address(RVA = "0x1DDB170", Offset = "0x1DD9B70", VA = "0x181DDB170", Slot = "5")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
while (parameters != 0 && parameters != 0)
{
if (parameters != 0)
{
byte[] iv = this.IV;
byte[] array;
int length = array.Length;
int length2 = iv.Length;
int num = 0;
int num2 = 0;
Array.Copy(array, num, iv, num2, length2);
break;
}
}
byte[] iv2 = this.IV;
int length3 = iv2.Length;
int num3 = 0;
byte[] array2 = this.ofbV;
int num4 = 0;
Array.Copy(iv2, num4, array2, num3, length3);
IBlockCipher blockCipher = this.cipher;
if (parameters != 0)
{
IBlockCipher blockCipher2 = this.cipher;
}
}
// Token: 0x17001882 RID: 6274
// (get) Token: 0x060098F5 RID: 39157 RVA: 0x0021FC04 File Offset: 0x0021DE04
[Token(Token = "0x17001882")]
public string AlgorithmName
{
[Token(Token = "0x60098F5")]
[Address(RVA = "0x1DDB6F0", Offset = "0x1DDA0F0", VA = "0x181DDB6F0", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
int num = this.blockSize;
string text;
return text;
}
}
// Token: 0x17001883 RID: 6275
// (get) Token: 0x060098F6 RID: 39158 RVA: 0x0021FC28 File Offset: 0x0021DE28
[Token(Token = "0x17001883")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x60098F6")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "7")]
get
{
return true;
}
}
// Token: 0x060098F7 RID: 39159 RVA: 0x0021FC38 File Offset: 0x0021DE38
[Token(Token = "0x60098F7")]
[Address(RVA = "0x4D24F0", Offset = "0x4D0EF0", VA = "0x1804D24F0", Slot = "6")]
public int GetBlockSize()
{
return this.blockSize;
}
// Token: 0x060098F8 RID: 39160 RVA: 0x0021FC4C File Offset: 0x0021DE4C
[Token(Token = "0x60098F8")]
[Address(RVA = "0x1DDB390", Offset = "0x1DD9D90", VA = "0x181DDB390", Slot = "8")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.ofbOutV;
int num = this.blockSize;
if (num > 0)
{
byte[] array2 = this.ofbOutV;
int num2 = this.blockSize;
}
byte[] array3 = this.ofbV;
int num3 = array3.Length;
int num4 = 0;
num3 -= num;
Array.Copy(array3, num, array3, num4, num3);
byte[] array4 = this.ofbV;
int num5 = this.blockSize;
int num6 = 0;
int num7 = array4.Length;
byte[] array5 = this.ofbOutV;
num7 -= num5;
Array.Copy(array5, num6, array4, num7, num5);
return this.blockSize;
}
// Token: 0x060098F9 RID: 39161 RVA: 0x0021FCF4 File Offset: 0x0021DEF4
[Token(Token = "0x60098F9")]
[Address(RVA = "0x1DDB5A0", Offset = "0x1DD9FA0", VA = "0x181DDB5A0", Slot = "9")]
public void Reset()
{
byte[] iv = this.IV;
int length = iv.Length;
int num = 0;
byte[] array = this.ofbV;
int num2 = 0;
Array.Copy(iv, num2, array, num, length);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x04006486 RID: 25734
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006486")]
private byte[] IV;
// Token: 0x04006487 RID: 25735
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006487")]
private byte[] ofbV;
// Token: 0x04006488 RID: 25736
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006488")]
private byte[] ofbOutV;
// Token: 0x04006489 RID: 25737
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006489")]
private readonly int blockSize;
// Token: 0x0400648A RID: 25738
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x400648A")]
private readonly IBlockCipher cipher;
}
}
@@ -0,0 +1,341 @@
using System;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001662 RID: 5730
[Token(Token = "0x2001662")]
[StructLayout(3)]
public class OpenPgpCfbBlockCipher : IBlockCipher
{
// Token: 0x060098FA RID: 39162 RVA: 0x0021FD34 File Offset: 0x0021DF34
[Token(Token = "0x60098FA")]
[Address(RVA = "0x1DDC8D0", Offset = "0x1DDB2D0", VA = "0x181DDC8D0")]
public OpenPgpCfbBlockCipher(IBlockCipher cipher)
{
this.cipher = cipher;
byte[] array = new byte[0];
int num = this.blockSize;
this.IV = array;
byte[] array2 = new byte[num];
int num2 = this.blockSize;
this.FR = array2;
byte[] array3 = new byte[num2];
this.FRE = array3;
}
// Token: 0x060098FB RID: 39163 RVA: 0x0021FD90 File Offset: 0x0021DF90
[Token(Token = "0x60098FB")]
[Address(RVA = "0x3C1230", Offset = "0x3BFC30", VA = "0x1803C1230")]
public IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x17001884 RID: 6276
// (get) Token: 0x060098FC RID: 39164 RVA: 0x0021FDA4 File Offset: 0x0021DFA4
[Token(Token = "0x17001884")]
public string AlgorithmName
{
[Token(Token = "0x60098FC")]
[Address(RVA = "0x1DDC970", Offset = "0x1DDB370", VA = "0x181DDC970", Slot = "4")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/OpenPGPCFB";
}
}
// Token: 0x17001885 RID: 6277
// (get) Token: 0x060098FD RID: 39165 RVA: 0x0021FDCC File Offset: 0x0021DFCC
[Token(Token = "0x17001885")]
public bool IsPartialBlockOkay
{
[Token(Token = "0x60098FD")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "7")]
get
{
return true;
}
}
// Token: 0x060098FE RID: 39166 RVA: 0x0021FDDC File Offset: 0x0021DFDC
[Token(Token = "0x60098FE")]
[Address(RVA = "0x1DDC5A0", Offset = "0x1DDAFA0", VA = "0x181DDC5A0", Slot = "6")]
public int GetBlockSize()
{
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x060098FF RID: 39167 RVA: 0x0021FDF8 File Offset: 0x0021DFF8
[Token(Token = "0x60098FF")]
[Address(RVA = "0x1DDC820", Offset = "0x1DDB220", VA = "0x181DDC820", Slot = "8")]
public int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
if (this.forEncryption)
{
int num;
return num;
}
int num2;
return num2;
}
// Token: 0x06009900 RID: 39168 RVA: 0x0021FE14 File Offset: 0x0021E014
[Token(Token = "0x6009900")]
[Address(RVA = "0x1DDC850", Offset = "0x1DDB250", VA = "0x181DDC850", Slot = "9")]
public void Reset()
{
byte[] fr = this.FR;
int num = 0;
this.count = num;
byte[] iv = this.IV;
int num2 = 0;
int num3 = 0;
int length = fr.Length;
Array.Copy(iv, num3, fr, num2, length);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x06009901 RID: 39169 RVA: 0x0021FE60 File Offset: 0x0021E060
[Token(Token = "0x6009901")]
[Address(RVA = "0x1DDC5F0", Offset = "0x1DDAFF0", VA = "0x181DDC5F0", Slot = "5")]
public void Init(bool forEncryption, ICipherParameters parameters)
{
int num;
do
{
num = 0;
this.forEncryption = forEncryption;
if (parameters == 0 || parameters == 0)
{
goto IL_46;
}
}
while (parameters == 0);
byte[] iv = this.IV;
byte[] array;
int length = array.Length;
int length2 = iv.Length;
int num2 = 0;
int num3 = 0;
Array.Copy(array, num2, iv, num3, length2);
IL_46:
byte[] fr = this.FR;
this.count = num;
int length3 = fr.Length;
int num4 = 0;
byte[] iv2 = this.IV;
int num5 = 0;
Array.Copy(iv2, num5, fr, num4, length3);
IBlockCipher blockCipher = this.cipher;
IBlockCipher blockCipher2 = this.cipher;
}
// Token: 0x06009902 RID: 39170 RVA: 0x0021FF00 File Offset: 0x0021E100
[Token(Token = "0x6009902")]
[Address(RVA = "0x1DDC560", Offset = "0x1DDAF60", VA = "0x181DDC560")]
private byte EncryptByte(byte data, int blockOff)
{
byte[] fre = this.FRE;
byte b;
return b;
}
// Token: 0x06009903 RID: 39171 RVA: 0x0021FF1C File Offset: 0x0021E11C
[Token(Token = "0x6009903")]
[Address(RVA = "0x1DDBEB0", Offset = "0x1DDA8B0", VA = "0x181DDBEB0")]
private int EncryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
int num;
int num2;
byte[] fre5;
for (;;)
{
num = this.blockSize;
int length = input.Length;
int length2 = outBytes.Length;
num2 = this.count;
if (num2 != 0)
{
break;
}
IBlockCipher blockCipher = this.cipher;
byte[] fre = this.FRE;
int num3 = 0;
if (this.blockSize > 0)
{
byte[] fr = this.FR;
byte[] fre2 = this.FRE;
byte b = fre[input];
num3++;
int num4 = this.blockSize;
byte[] fr2 = this.FR;
byte[] fre3 = this.FRE;
num4 += -2;
byte b2;
fr2[0] = b2;
int num5 = inOff + 1;
byte[] fr3 = this.FR;
byte[] fre4 = this.FRE;
int num6 = this.blockSize;
byte b3;
fr3[0] = b3;
IBlockCipher blockCipher2 = this.cipher;
fre5 = this.FRE;
if (this.blockSize > 2)
{
goto Block_4;
}
}
}
if (num2 == num)
{
IBlockCipher blockCipher3 = this.cipher;
byte[] fre6 = this.FRE;
byte[] fre7 = this.FRE;
int num7 = inOff + 1;
byte[] fre8 = this.FRE;
int num8 = this.blockSize;
int num9 = 0;
byte[] fr4 = this.FR;
Array.Copy(fr4, 2, fr4, num9, num8);
IBlockCipher blockCipher4 = this.cipher;
byte[] fre9 = this.FRE;
if (this.blockSize > 2)
{
byte[] fr5 = this.FR;
byte[] fre10 = this.FRE;
byte b4;
fre9[0] = b4;
int num10 = this.blockSize;
}
}
return num;
Block_4:
byte[] fr6 = this.FR;
byte[] fre11 = this.FRE;
byte b5;
fre5[0] = b5;
int num11 = this.blockSize;
throw new NullReferenceException();
}
// Token: 0x06009904 RID: 39172 RVA: 0x002200B0 File Offset: 0x0021E2B0
[Token(Token = "0x6009904")]
[Address(RVA = "0x1DDB780", Offset = "0x1DDA180", VA = "0x181DDB780")]
private int DecryptBlock(byte[] input, int inOff, byte[] outBytes, int outOff)
{
int num;
int num2;
byte[] fre5;
for (;;)
{
num = this.blockSize;
int length = input.Length;
num2 = this.count;
if (num2 != 0)
{
break;
}
IBlockCipher blockCipher = this.cipher;
byte[] fre = this.FRE;
int num3 = 0;
if (this.blockSize > 0)
{
byte[] fr = this.FR;
byte[] fre2 = this.FRE;
num3++;
int num4 = this.blockSize;
byte[] fr2 = this.FR;
byte[] fre3 = this.FRE;
int num5 = this.blockSize;
int num6 = inOff + 1;
byte[] fr3 = this.FR;
int num7 = this.blockSize;
byte[] fre4 = this.FRE;
int num8 = this.blockSize;
IBlockCipher blockCipher2 = this.cipher;
fre5 = this.FRE;
if (this.blockSize > 2)
{
goto Block_4;
}
}
}
if (num2 == num)
{
IBlockCipher blockCipher3 = this.cipher;
byte[] fre6 = this.FRE;
int length2 = input.Length;
int num9 = inOff + 1;
byte[] fre7 = this.FRE;
byte[] fre8 = this.FRE;
int num10 = 0;
int num11 = this.blockSize;
byte[] fr4 = this.FR;
Array.Copy(fr4, 2, fr4, num10, num11);
byte[] fr5 = this.FR;
int num12 = this.blockSize;
byte[] fr6 = this.FR;
int num13 = this.blockSize;
IBlockCipher blockCipher4 = this.cipher;
byte[] fre9 = this.FRE;
if (this.blockSize > 2)
{
byte[] fr7 = this.FR;
byte b = fre9[input];
fre9[0] = b;
byte[] fre10 = this.FRE;
int num14 = this.blockSize;
}
}
return num;
Block_4:
byte[] fr8 = this.FR;
byte b2 = fre5[input];
fre5[0] = b2;
byte[] fre11 = this.FRE;
int num15 = this.blockSize;
throw new NullReferenceException();
}
// Token: 0x0400648B RID: 25739
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x400648B")]
private byte[] IV;
// Token: 0x0400648C RID: 25740
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x400648C")]
private byte[] FR;
// Token: 0x0400648D RID: 25741
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x400648D")]
private byte[] FRE;
// Token: 0x0400648E RID: 25742
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x400648E")]
private readonly IBlockCipher cipher;
// Token: 0x0400648F RID: 25743
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x400648F")]
private readonly int blockSize;
// Token: 0x04006490 RID: 25744
[global::Cpp2IlInjected.FieldOffset(Offset = "0x34")]
[Token(Token = "0x4006490")]
private int count;
// Token: 0x04006491 RID: 25745
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x4006491")]
private bool forEncryption;
}
}
@@ -0,0 +1,166 @@
using System;
using System.Runtime.InteropServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes
{
// Token: 0x02001663 RID: 5731
[Token(Token = "0x2001663")]
[StructLayout(3)]
public class SicBlockCipher : IBlockCipher
{
// Token: 0x06009905 RID: 39173 RVA: 0x00220264 File Offset: 0x0021E464
[Token(Token = "0x6009905")]
[Address(RVA = "0x1DDF9B0", Offset = "0x1DDE3B0", VA = "0x181DDF9B0")]
public SicBlockCipher(IBlockCipher cipher)
{
this.cipher = cipher;
byte[] array = new byte[0];
int num = this.blockSize;
this.counter = array;
byte[] array2 = new byte[num];
int num2 = this.blockSize;
this.counterOut = array2;
byte[] array3 = new byte[num2];
this.IV = array3;
}
// Token: 0x06009906 RID: 39174 RVA: 0x002202C0 File Offset: 0x0021E4C0
[Token(Token = "0x6009906")]
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0", Slot = "10")]
public virtual IBlockCipher GetUnderlyingCipher()
{
return this.cipher;
}
// Token: 0x06009907 RID: 39175 RVA: 0x002202D4 File Offset: 0x0021E4D4
[Token(Token = "0x6009907")]
[Address(RVA = "0x1DDF4E0", Offset = "0x1DDDEE0", VA = "0x181DDF4E0", Slot = "11")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (06009907)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Modes.SicBlockCipher::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_5C:
stloc:ArgumentException(var_10_6B, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("CTR/SIC mode requires ParametersWithIV"), ldstr:string("parameters")))
}
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: 0x17001886 RID: 6278
// (get) Token: 0x06009908 RID: 39176 RVA: 0x00220350 File Offset: 0x0021E550
[Token(Token = "0x17001886")]
public virtual string AlgorithmName
{
[Token(Token = "0x6009908")]
[Address(RVA = "0x1DDFA50", Offset = "0x1DDE450", VA = "0x181DDFA50", Slot = "12")]
get
{
IBlockCipher blockCipher = this.cipher;
return 0 + "/SIC";
}
}
// Token: 0x17001887 RID: 6279
// (get) Token: 0x06009909 RID: 39177 RVA: 0x00220378 File Offset: 0x0021E578
[Token(Token = "0x17001887")]
public virtual bool IsPartialBlockOkay
{
[Token(Token = "0x6009909")]
[Address(RVA = "0x4405A0", Offset = "0x43EFA0", VA = "0x1804405A0", Slot = "13")]
get
{
return true;
}
}
// Token: 0x0600990A RID: 39178 RVA: 0x00220388 File Offset: 0x0021E588
[Token(Token = "0x600990A")]
[Address(RVA = "0x1DDF490", Offset = "0x1DDDE90", VA = "0x181DDF490", Slot = "14")]
public virtual int GetBlockSize()
{
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x0600990B RID: 39179 RVA: 0x002203A4 File Offset: 0x0021E5A4
[Token(Token = "0x600990B")]
[Address(RVA = "0x1DDF760", Offset = "0x1DDE160", VA = "0x181DDF760", Slot = "15")]
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
IBlockCipher blockCipher = this.cipher;
byte[] array = this.counterOut;
int num = 0;
byte[] array2 = this.counterOut;
if (num < array2.Length)
{
byte[] array3 = this.counterOut;
}
int length = this.counter.Length;
byte[] array4 = this.counter;
while (length == array4.Length)
{
}
return this.counter.Length;
}
// Token: 0x0600990C RID: 39180 RVA: 0x0022040C File Offset: 0x0021E60C
[Token(Token = "0x600990C")]
[Address(RVA = "0x1DDF900", Offset = "0x1DDE300", VA = "0x181DDF900", Slot = "16")]
public virtual void Reset()
{
byte[] array = this.counter;
int num = 0;
Arrays.Fill(array, (byte)num);
byte[] iv = this.IV;
int length = iv.Length;
int num2 = 0;
byte[] array2 = this.counter;
int num3 = 0;
Array.Copy(iv, num3, array2, num2, length);
IBlockCipher blockCipher = this.cipher;
throw new NullReferenceException();
}
// Token: 0x04006492 RID: 25746
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x4006492")]
private readonly IBlockCipher cipher;
// Token: 0x04006493 RID: 25747
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x4006493")]
private readonly int blockSize;
// Token: 0x04006494 RID: 25748
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x4006494")]
private readonly byte[] counter;
// Token: 0x04006495 RID: 25749
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x4006495")]
private readonly byte[] counterOut;
// Token: 0x04006496 RID: 25750
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x4006496")]
private byte[] IV;
}
}