Files
Jan2021-Cpp2Il-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Crypto/Engines/RijndaelEngine.cs
T
2026-04-08 23:40:05 +02:00

731 lines
27 KiB
C#

using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
{
// Token: 0x020016C9 RID: 5833
[Token(Token = "0x20016C9")]
[StructLayout(3)]
public class RijndaelEngine : IBlockCipher
{
// Token: 0x06009C9E RID: 40094 RVA: 0x00238A60 File Offset: 0x00236C60
[Token(Token = "0x6009C9E")]
[Address(RVA = "0x2131760", Offset = "0x2130160", VA = "0x182131760")]
private byte Mul0x2(int b)
{
if (b == 0)
{
}
byte[] logtable = RijndaelEngine.Logtable;
byte[] alogtable = RijndaelEngine.Alogtable;
byte b2;
return b2;
}
// Token: 0x06009C9F RID: 40095 RVA: 0x00238A88 File Offset: 0x00236C88
[Token(Token = "0x6009C9F")]
[Address(RVA = "0x2131820", Offset = "0x2130220", VA = "0x182131820")]
private byte Mul0x3(int b)
{
if (b == 0)
{
}
byte[] logtable = RijndaelEngine.Logtable;
byte[] alogtable = RijndaelEngine.Alogtable;
byte b2;
return b2;
}
// Token: 0x06009CA0 RID: 40096 RVA: 0x00238AB0 File Offset: 0x00236CB0
[Token(Token = "0x6009CA0")]
[Address(RVA = "0x21318E0", Offset = "0x21302E0", VA = "0x1821318E0")]
private byte Mul0x9(int b)
{
byte[] alogtable = RijndaelEngine.Alogtable;
byte b2;
return b2;
}
// Token: 0x06009CA1 RID: 40097 RVA: 0x00238ACC File Offset: 0x00236CCC
[Token(Token = "0x6009CA1")]
[Address(RVA = "0x2131980", Offset = "0x2130380", VA = "0x182131980")]
private byte Mul0xb(int b)
{
byte[] alogtable = RijndaelEngine.Alogtable;
byte b2;
return b2;
}
// Token: 0x06009CA2 RID: 40098 RVA: 0x00238AE8 File Offset: 0x00236CE8
[Token(Token = "0x6009CA2")]
[Address(RVA = "0x2131A20", Offset = "0x2130420", VA = "0x182131A20")]
private byte Mul0xd(int b)
{
byte[] alogtable = RijndaelEngine.Alogtable;
byte b2;
return b2;
}
// Token: 0x06009CA3 RID: 40099 RVA: 0x00238B04 File Offset: 0x00236D04
[Token(Token = "0x6009CA3")]
[Address(RVA = "0x2131AC0", Offset = "0x21304C0", VA = "0x182131AC0")]
private byte Mul0xe(int b)
{
byte[] alogtable = RijndaelEngine.Alogtable;
byte b2;
return b2;
}
// Token: 0x06009CA4 RID: 40100 RVA: 0x00238B20 File Offset: 0x00236D20
[Token(Token = "0x6009CA4")]
[Address(RVA = "0x21314C0", Offset = "0x212FEC0", VA = "0x1821314C0")]
private void KeyAddition(long[] rk)
{
long num = rk[3];
}
// Token: 0x06009CA5 RID: 40101 RVA: 0x00238B3C File Offset: 0x00236D3C
[Token(Token = "0x6009CA5")]
[Address(RVA = "0x2132200", Offset = "0x2130C00", VA = "0x182132200")]
private long Shift(long r, int shift)
{
int num = this.BC;
num -= shift;
return r;
}
// Token: 0x06009CA6 RID: 40102 RVA: 0x00238B58 File Offset: 0x00236D58
[Token(Token = "0x6009CA6")]
[Address(RVA = "0x21320E0", Offset = "0x2130AE0", VA = "0x1821320E0")]
private void ShiftRow(byte[] shiftsSC)
{
long a = this.A1;
byte b = shiftsSC[0];
int num = this.BC;
num -= (int)b;
this.A1 = a;
byte b2 = shiftsSC[0];
num -= (int)b2;
this.A2 = a;
byte b3 = shiftsSC[0];
num -= (int)b3;
this.A3 = a;
}
// Token: 0x06009CA7 RID: 40103 RVA: 0x00238BB4 File Offset: 0x00236DB4
[Token(Token = "0x6009CA7")]
[Address(RVA = "0x2130260", Offset = "0x212EC60", VA = "0x182130260")]
private long ApplyS(long r, byte[] box)
{
int bc = this.BC;
int num = 0;
if (bc > 0)
{
num += 8;
}
throw new NullReferenceException();
}
// Token: 0x06009CA8 RID: 40104 RVA: 0x00238BD8 File Offset: 0x00236DD8
[Token(Token = "0x6009CA8")]
[Address(RVA = "0x2132230", Offset = "0x2130C30", VA = "0x182132230")]
private void Substitution(byte[] box)
{
int bc = this.BC;
int num = 0;
long a = this.A0;
if (bc > 0)
{
num += 8;
}
this.A0 = (long)num;
if (bc > 0)
{
num += 8;
}
this.A1 = (long)num;
if (bc > 0)
{
num += 8;
}
this.A2 = (long)num;
if (bc > 0)
{
num += 8;
}
this.A3 = (long)num;
}
// Token: 0x06009CA9 RID: 40105 RVA: 0x00238C38 File Offset: 0x00236E38
[Token(Token = "0x6009CA9")]
[Address(RVA = "0x2131550", Offset = "0x212FF50", VA = "0x182131550")]
private void MixColumn()
{
int num = 0;
if (this.Alogtable > num)
{
long num2 = this.A0;
long num3 = this.A1;
long num4 = this.A2;
byte b = this.Mul0x2((int)num2);
num2 = num3;
byte b2 = this.Mul0x3((int)num2);
b = this.Mul0x2((int)num3);
num3 = num4;
byte b3 = this.Mul0x3((int)num3);
b = this.Mul0x2((int)num4);
byte b4 = this.Mul0x3((int)num4);
b = this.Mul0x2((int)num4);
num4 = num2;
byte b5 = this.Mul0x3((int)num4);
num += 8;
}
this.A0 = (long)num;
this.A1 = (long)num;
this.A2 = (long)num;
this.A3 = (long)num;
}
// Token: 0x06009CAA RID: 40106 RVA: 0x00238CD8 File Offset: 0x00236ED8
[Token(Token = "0x6009CAA")]
[Address(RVA = "0x2131080", Offset = "0x212FA80", VA = "0x182131080")]
private void InvMixColumn()
{
int num = 0;
if (this.Alogtable > num)
{
long num2 = this.A2;
long a = this.A0;
long a2 = this.A1;
num2 = this.A3;
byte[] logtable = RijndaelEngine.Logtable;
byte[] logtable2 = RijndaelEngine.Logtable;
byte[] logtable3 = RijndaelEngine.Logtable;
byte[] logtable4 = RijndaelEngine.Logtable;
uint num3;
byte b = this.Mul0xe((int)num3);
uint num4;
byte b2 = this.Mul0xb((int)num4);
uint num5;
byte b3 = this.Mul0xd((int)num5);
uint num6;
byte b4 = this.Mul0x9((int)num6);
b = this.Mul0xe((int)num4);
b2 = this.Mul0xb((int)num5);
b3 = this.Mul0xd((int)num6);
byte b5 = this.Mul0x9((int)num3);
b = this.Mul0xe((int)num5);
b2 = this.Mul0xb((int)num6);
b3 = this.Mul0xd((int)num3);
byte b6 = this.Mul0x9((int)num4);
b = this.Mul0xe((int)num6);
b2 = this.Mul0xb((int)num3);
b3 = this.Mul0xd((int)num4);
byte b7 = this.Mul0x9((int)num5);
num += 8;
}
this.A0 = (long)num;
this.A1 = (long)num;
this.A2 = (long)num;
this.A3 = (long)num;
}
// Token: 0x06009CAB RID: 40107 RVA: 0x00238DF4 File Offset: 0x00236FF4
[Token(Token = "0x6009CAB")]
[Address(RVA = "0x21305F0", Offset = "0x212EFF0", VA = "0x1821305F0")]
private long[][] GenerateWorkingKey(byte[] key)
{
long[][] array;
int num10;
for (;;)
{
int length = key.Length;
int maxkc = RijndaelEngine.MAXKC;
int num = RijndaelEngine.MAXROUNDS;
num++;
array = new long[num][];
int num2 = 0;
int num3 = RijndaelEngine.MAXROUNDS;
num3++;
if (num2 < num3)
{
long[] array2 = new long[4];
if (array2 != 0)
{
}
num2++;
array[0] = array2;
}
if (length > 160)
{
if (length == 192)
{
}
if (length == 224)
{
}
if (length != 256)
{
continue;
}
}
if (length == 128)
{
}
if (length == 160)
{
if (length < this.blockBits)
{
int num4 = this.BC;
num4 += num;
}
uint num5;
num5 += (uint)6;
int num6 = 0;
int num7 = 0;
this.ROUNDS = (int)num5;
int num8 = 0;
int length2 = key.Length;
if (num8 < length2)
{
num6++;
num7++;
num7 += num8;
int num9 = num7 * (int)num5;
num7++;
}
num10 = 0;
int num11 = this.BC;
int rounds = this.ROUNDS;
num11 += num7;
int num12 = (rounds + 1) * num11;
if (num10 < num12)
{
break;
}
}
}
long[] array3 = array[num10];
throw new IndexOutOfRangeException();
}
// Token: 0x06009CAC RID: 40108 RVA: 0x002390A8 File Offset: 0x002372A8
[Token(Token = "0x6009CAC")]
[Address(RVA = "0x2132BC0", Offset = "0x21315C0", VA = "0x182132BC0")]
public RijndaelEngine()
{
}
// Token: 0x06009CAD RID: 40109 RVA: 0x002390B8 File Offset: 0x002372B8
[Token(Token = "0x6009CAD")]
[Address(RVA = "0x2132BD0", Offset = "0x21315D0", VA = "0x182132BD0")]
public RijndaelEngine(int blockBits)
{
/*
An exception occurred when decompiling this method (06009CAD)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.RijndaelEngine::.ctor(System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_13A:
stloc:ArgumentException(var_10_144, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("unknown blocksize to Rijndael")))
}
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: 0x06009CAE RID: 40110 RVA: 0x0023920C File Offset: 0x0023740C
[Token(Token = "0x6009CAE")]
[Address(RVA = "0x2130EB0", Offset = "0x212F8B0", VA = "0x182130EB0", Slot = "10")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (06009CAE)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.RijndaelEngine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_3B:
stloc:ArgumentException(var_7_4C, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string("invalid parameter passed to Rijndael init - "), ldloc:string(var_6))))
}
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: 0x170018E8 RID: 6376
// (get) Token: 0x06009CAF RID: 40111 RVA: 0x00239268 File Offset: 0x00237468
[Token(Token = "0x170018E8")]
public virtual string AlgorithmName
{
[Token(Token = "0x6009CAF")]
[Address(RVA = "0x2133030", Offset = "0x2131A30", VA = "0x182133030", Slot = "11")]
get
{
return "Rijndael";
}
}
// Token: 0x170018E9 RID: 6377
// (get) Token: 0x06009CB0 RID: 40112 RVA: 0x0023927C File Offset: 0x0023747C
[Token(Token = "0x170018E9")]
public virtual bool IsPartialBlockOkay
{
[Token(Token = "0x6009CB0")]
[Address(RVA = "0x413970", Offset = "0x412370", VA = "0x180413970", Slot = "12")]
get
{
}
}
// Token: 0x06009CB1 RID: 40113 RVA: 0x0023928C File Offset: 0x0023748C
[Token(Token = "0x6009CB1")]
[Address(RVA = "0x2130EA0", Offset = "0x212F8A0", VA = "0x182130EA0", Slot = "13")]
public virtual int GetBlockSize()
{
return this.BC;
}
// Token: 0x06009CB2 RID: 40114 RVA: 0x002392A0 File Offset: 0x002374A0
[Token(Token = "0x6009CB2")]
[Address(RVA = "0x2131C40", Offset = "0x2130640", VA = "0x182131C40", Slot = "14")]
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (06009CB2)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.RijndaelEngine::ProcessBlock(System.Byte[],System.Int32,System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_1A5:
stloc:InvalidOperationException(var_26_1AF, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Rijndael engine not initialised")))
}
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: 0x06009CB3 RID: 40115 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x6009CB3")]
[Address(RVA = "0x3C9F60", Offset = "0x3C8960", VA = "0x1803C9F60", Slot = "15")]
public virtual void Reset()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x06009CB4 RID: 40116 RVA: 0x00239460 File Offset: 0x00237660
[Token(Token = "0x6009CB4")]
[Address(RVA = "0x21323E0", Offset = "0x2130DE0", VA = "0x1821323E0")]
private void UnPackBlock(byte[] bytes, int off)
{
byte b;
this.A0 = (long)b;
int num = off + 1;
byte b2;
this.A1 = (long)b2;
byte b3;
this.A2 = (long)b3;
int num2 = off + 1;
int bc = this.BC;
byte b4;
this.A3 = (long)b4;
uint num3;
if (bc != (int)num3)
{
int num4 = num2 + 1;
num2 += 2;
byte b5 = bytes[num2];
num3 += (uint)8;
while (num3 != (uint)bc)
{
}
}
}
// Token: 0x06009CB5 RID: 40117 RVA: 0x002394CC File Offset: 0x002376CC
[Token(Token = "0x6009CB5")]
[Address(RVA = "0x2131B60", Offset = "0x2130560", VA = "0x182131B60")]
private void PackBlock(byte[] bytes, int off)
{
int num = 0;
if (this.Alogtable != num)
{
long a = this.A0;
int num2 = off + 1;
long a2 = this.A1;
bytes[0] = (byte)a2;
long a3 = this.A2;
bytes[0] = (byte)a3;
long a4 = this.A3;
num += 8;
while (num != this.Alogtable)
{
}
}
}
// Token: 0x06009CB6 RID: 40118 RVA: 0x0023952C File Offset: 0x0023772C
[Token(Token = "0x6009CB6")]
[Address(RVA = "0x2130460", Offset = "0x212EE60", VA = "0x182130460")]
private void EncryptBlock(long[][] rk)
{
long[] array = rk[0];
this.KeyAddition(array);
if (this.ROUNDS > 1)
{
byte[] s = RijndaelEngine.S;
this.Substitution(s);
byte[] array2 = this.shifts0SC;
this.ShiftRow(array2);
this.MixColumn();
long[] array3;
this.KeyAddition(array3);
}
byte[] s2 = RijndaelEngine.S;
this.Substitution(s2);
byte[] array4 = this.shifts0SC;
this.ShiftRow(array4);
int rounds = this.ROUNDS;
long[] array5 = rk[rounds];
this.KeyAddition(array5);
}
// Token: 0x06009CB7 RID: 40119 RVA: 0x002395B8 File Offset: 0x002377B8
[Token(Token = "0x6009CB7")]
[Address(RVA = "0x21302D0", Offset = "0x212ECD0", VA = "0x1821302D0")]
private void DecryptBlock(long[][] rk)
{
int rounds = this.ROUNDS;
long[] array = rk[rounds];
this.KeyAddition(array);
byte[] si = RijndaelEngine.Si;
this.Substitution(si);
byte[] array2 = this.shifts1SC;
this.ShiftRow(array2);
int rounds2 = this.ROUNDS;
if (rounds2 > 0)
{
long[] array3 = rk[rounds2];
this.KeyAddition(array3);
this.InvMixColumn();
byte[] si2 = RijndaelEngine.Si;
this.Substitution(si2);
byte[] array4 = this.shifts1SC;
this.ShiftRow(array4);
}
long[] array5 = rk[0];
this.KeyAddition(array5);
}
// Token: 0x06009CB8 RID: 40120 RVA: 0x00239654 File Offset: 0x00237854
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x6009CB8")]
[Address(RVA = "0x2132580", Offset = "0x2130F80", VA = "0x182132580")]
static RijndaelEngine()
{
byte[] array = new byte[256];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.8AC10B57091AFE182D9E4375C05E3FA037FFB3FA).FieldHandle);
RijndaelEngine.Logtable = array;
byte[] array2 = new byte[511];
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.A94DF043C88FB07ACCA327B6A0BB063F20637E71).FieldHandle);
RijndaelEngine.Alogtable = array2;
byte[] array3 = new byte[256];
RuntimeHelpers.InitializeArray(array3, fieldof(<PrivateImplementationDetails>.8F22C9ECE1331718CBD268A9BBFD2F5E451441E3).FieldHandle);
RijndaelEngine.S = array3;
byte[] array4 = new byte[256];
RuntimeHelpers.InitializeArray(array4, fieldof(<PrivateImplementationDetails>.0C4110BC17D746F018F47B49E0EB0D6590F69939).FieldHandle);
RijndaelEngine.Si = array4;
byte[] array5 = new byte[30];
RuntimeHelpers.InitializeArray(array5, fieldof(<PrivateImplementationDetails>.B8DB0CB599EDD82A386D1A154FB3EB9235513DAD).FieldHandle);
RijndaelEngine.rcon = array5;
byte[][] array6 = new byte[5][];
byte[] array7 = new byte[4];
RuntimeHelpers.InitializeArray(array7, fieldof(<PrivateImplementationDetails>.8D3FE5CBAB9E7C2A376892E4DD9EF43B5F8A712A).FieldHandle);
if (array7 != 0)
{
}
array6[0] = array7;
byte[] array8 = new byte[4];
RuntimeHelpers.InitializeArray(array8, fieldof(<PrivateImplementationDetails>.8D3FE5CBAB9E7C2A376892E4DD9EF43B5F8A712A).FieldHandle);
if (array8 != 0)
{
}
array6[1] = array8;
byte[] array9 = new byte[4];
RuntimeHelpers.InitializeArray(array9, fieldof(<PrivateImplementationDetails>.8D3FE5CBAB9E7C2A376892E4DD9EF43B5F8A712A).FieldHandle);
if (array9 != 0)
{
}
array6[2] = array9;
byte[] array10 = new byte[4];
RuntimeHelpers.InitializeArray(array10, fieldof(<PrivateImplementationDetails>.18F46E3C2ECF4BAAE65361632BA7C1B4B9028827).FieldHandle);
if (array10 != 0)
{
}
array6[3] = array10;
byte[] array11 = new byte[4];
RuntimeHelpers.InitializeArray(array11, fieldof(<PrivateImplementationDetails>.D5B4B2417720C9E5EDBF83CB4440D9C8B76B5557).FieldHandle);
if (array11 != 0)
{
}
array6[4] = array11;
RijndaelEngine.shifts0 = array6;
byte[][] array12 = new byte[5][];
byte[] array13 = new byte[4];
RuntimeHelpers.InitializeArray(array13, fieldof(<PrivateImplementationDetails>.47A4F979AF156CDA62313B97411B4C6CE62B8B5A).FieldHandle);
if (array13 != 0)
{
}
array12[0] = array13;
byte[] array14 = new byte[4];
RuntimeHelpers.InitializeArray(array14, fieldof(<PrivateImplementationDetails>.3E8E493888B1BFB763D7553A6CC1978C17C198A3).FieldHandle);
if (array14 != 0)
{
}
array12[1] = array14;
byte[] array15 = new byte[4];
RuntimeHelpers.InitializeArray(array15, fieldof(<PrivateImplementationDetails>.3045D5B29BA900304981918A153806D371B02549).FieldHandle);
if (array15 != 0)
{
}
array12[2] = array15;
byte[] array16 = new byte[4];
RuntimeHelpers.InitializeArray(array16, fieldof(<PrivateImplementationDetails>.F3E701C38098B41D23FA88977423371B3C00C0D1).FieldHandle);
if (array16 != 0)
{
}
array12[3] = array16;
byte[] array17 = new byte[4];
RuntimeHelpers.InitializeArray(array17, fieldof(<PrivateImplementationDetails>.6D19ABD7FD0986E382242A9B88C8D8B5F52598DF).FieldHandle);
if (array17 != 0)
{
}
array12[4] = array17;
RijndaelEngine.shifts1 = array12;
}
// Token: 0x040066AD RID: 26285
[Token(Token = "0x40066AD")]
private static readonly int MAXROUNDS;
// Token: 0x040066AE RID: 26286
[Token(Token = "0x40066AE")]
private static readonly int MAXKC;
// Token: 0x040066AF RID: 26287
[Token(Token = "0x40066AF")]
private static readonly byte[] Logtable;
// Token: 0x040066B0 RID: 26288
[Token(Token = "0x40066B0")]
private static readonly byte[] Alogtable;
// Token: 0x040066B1 RID: 26289
[Token(Token = "0x40066B1")]
private static readonly byte[] S;
// Token: 0x040066B2 RID: 26290
[Token(Token = "0x40066B2")]
private static readonly byte[] Si;
// Token: 0x040066B3 RID: 26291
[Token(Token = "0x40066B3")]
private static readonly byte[] rcon;
// Token: 0x040066B4 RID: 26292
[Token(Token = "0x40066B4")]
private static readonly byte[][] shifts0;
// Token: 0x040066B5 RID: 26293
[Token(Token = "0x40066B5")]
private static readonly byte[][] shifts1;
// Token: 0x040066B6 RID: 26294
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
[Token(Token = "0x40066B6")]
private int BC;
// Token: 0x040066B7 RID: 26295
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
[Token(Token = "0x40066B7")]
private long BC_MASK;
// Token: 0x040066B8 RID: 26296
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
[Token(Token = "0x40066B8")]
private int ROUNDS;
// Token: 0x040066B9 RID: 26297
[global::Cpp2IlInjected.FieldOffset(Offset = "0x24")]
[Token(Token = "0x40066B9")]
private int blockBits;
// Token: 0x040066BA RID: 26298
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
[Token(Token = "0x40066BA")]
private long[][] workingKey;
// Token: 0x040066BB RID: 26299
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
[Token(Token = "0x40066BB")]
private long A0;
// Token: 0x040066BC RID: 26300
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
[Token(Token = "0x40066BC")]
private long A1;
// Token: 0x040066BD RID: 26301
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
[Token(Token = "0x40066BD")]
private long A2;
// Token: 0x040066BE RID: 26302
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
[Token(Token = "0x40066BE")]
private long A3;
// Token: 0x040066BF RID: 26303
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
[Token(Token = "0x40066BF")]
private bool forEncryption;
// Token: 0x040066C0 RID: 26304
[global::Cpp2IlInjected.FieldOffset(Offset = "0x58")]
[Token(Token = "0x40066C0")]
private byte[] shifts0SC;
// Token: 0x040066C1 RID: 26305
[global::Cpp2IlInjected.FieldOffset(Offset = "0x60")]
[Token(Token = "0x40066C1")]
private byte[] shifts1SC;
}
}