Files
niko 8fc35183db a
2026-04-11 22:19:20 +02:00

561 lines
26 KiB
C#

using System;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
{
// Token: 0x02001C85 RID: 7301
[Token(Token = "0x2001C85")]
public class CamelliaEngine : IBlockCipher
{
// Token: 0x0600B6FF RID: 46847 RVA: 0x00284210 File Offset: 0x00282410
[Token(Token = "0x600B6FF")]
[Address(RVA = "0x1A6BDB0", Offset = "0x1A6ABB0", VA = "0x181A6BDB0")]
private static uint rightRotate(uint x, int s)
{
return x;
}
// Token: 0x0600B700 RID: 46848 RVA: 0x00284220 File Offset: 0x00282420
[Token(Token = "0x600B700")]
[Address(RVA = "0x1A6B260", Offset = "0x1A6A060", VA = "0x181A6B260")]
private static uint leftRotate(uint x, int s)
{
return x;
}
// Token: 0x0600B701 RID: 46849 RVA: 0x00284230 File Offset: 0x00282430
[Token(Token = "0x600B701")]
[Address(RVA = "0x1A6BDD0", Offset = "0x1A6ABD0", VA = "0x181A6BDD0")]
private static void roldq(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
{
int length = ki.Length;
uint num = ki[ioff];
int num2 = ioff + 1;
uint num3 = ki[num2];
ko[0] = num3;
int length2 = ki.Length;
uint num4 = ki[(int)num];
ko[0] = num4;
int length3 = ki.Length;
uint num5 = ki[(int)num4];
ko[0] = num5;
int length4 = ki.Length;
ko[0] = num5;
uint num6;
ki[0] = num6;
uint num7;
ki[0] = num7;
ki[0] = num7;
}
// Token: 0x0600B702 RID: 46850 RVA: 0x002842D0 File Offset: 0x002824D0
[Token(Token = "0x600B702")]
[Address(RVA = "0x1A6ABC0", Offset = "0x1A699C0", VA = "0x181A6ABC0")]
private static void decroldq(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
{
int length = ki.Length;
uint num = ki[ioff];
int num2 = ioff + 1;
uint num3 = ki[num2];
ko[0] = num3;
int length2 = ki.Length;
uint num4 = ki[(int)num];
ko[0] = num4;
int length3 = ki.Length;
uint num5 = ki[(int)num];
uint num6 = ki[(int)num4];
ko[0] = num6;
int length4 = ki.Length;
ko[0] = num6;
uint num7;
ki[0] = num7;
uint num8;
ki[0] = num8;
ki[0] = num8;
}
// Token: 0x0600B703 RID: 46851 RVA: 0x00284370 File Offset: 0x00282570
[Token(Token = "0x600B703")]
[Address(RVA = "0x1A6C110", Offset = "0x1A6AF10", VA = "0x181A6C110")]
private static void roldqo32(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
{
int length = ki.Length;
int num = ioff + 1;
uint num2;
ko[0] = num2;
int length2 = ki.Length;
uint num3 = ki[(int)num2];
ko[0] = num3;
int length3 = ki.Length;
uint num4 = ki[(int)num2];
uint num5 = ki[ioff];
ko[0] = num5;
int length4 = ki.Length;
uint num6 = ki[num];
ko[0] = num6;
uint num7;
ki[0] = num7;
uint num8;
ki[0] = num8;
uint num9 = ko[(int)num3];
ki[0] = num9;
}
// Token: 0x0600B704 RID: 46852 RVA: 0x0028441C File Offset: 0x0028261C
[Token(Token = "0x600B704")]
[Address(RVA = "0x1A6AF00", Offset = "0x1A69D00", VA = "0x181A6AF00")]
private static void decroldqo32(int rot, uint[] ki, int ioff, uint[] ko, int ooff)
{
int length = ki.Length;
int num = ioff + 1;
uint num2;
ko[0] = num2;
int length2 = ki.Length;
uint num3 = ki[(int)num2];
ko[0] = num3;
int length3 = ki.Length;
uint num4 = ki[(int)num2];
uint num5 = ki[ioff];
ko[0] = num5;
int length4 = ki.Length;
uint num6 = ki[num];
ko[0] = num6;
uint num7;
ki[0] = num7;
uint num8;
ki[0] = num8;
uint num9;
ki[0] = num9;
}
// Token: 0x0600B705 RID: 46853 RVA: 0x002844B8 File Offset: 0x002826B8
[Token(Token = "0x600B705")]
[Address(RVA = "0x1A6A410", Offset = "0x1A69210", VA = "0x181A6A410")]
private static uint bytes2uint(byte[] src, int offset)
{
int num = 0;
byte b;
num += (int)b;
throw new NullReferenceException();
}
// Token: 0x0600B706 RID: 46854 RVA: 0x002844D0 File Offset: 0x002826D0
[Token(Token = "0x600B706")]
[Address(RVA = "0x1A6E280", Offset = "0x1A6D080", VA = "0x181A6E280")]
private static void uint2bytes(uint word, byte[] dst, int offset)
{
int num = 0;
num++;
}
// Token: 0x0600B707 RID: 46855 RVA: 0x002844EC File Offset: 0x002826EC
[Token(Token = "0x600B707")]
[Address(RVA = "0x1A6A470", Offset = "0x1A69270", VA = "0x181A6A470")]
private static void camelliaF2(uint[] s, uint[] skey, int keyoff)
{
uint num = skey[keyoff];
uint[] sbox4_ = CamelliaEngine.SBOX4_4404;
uint[] sbox3_ = CamelliaEngine.SBOX3_3033;
uint num2 = sbox4_[(int)num];
uint[] sbox2_ = CamelliaEngine.SBOX2_0222;
uint[] sbox1_ = CamelliaEngine.SBOX1_1110;
int length = s.Length;
int num3 = keyoff + 1;
uint num4 = skey[num3];
num4 += num4;
s[1] = num4;
uint num5 = skey[(int)num4];
uint[] sbox4_2 = CamelliaEngine.SBOX4_4404;
uint[] sbox3_2 = CamelliaEngine.SBOX3_3033;
uint[] sbox2_2 = CamelliaEngine.SBOX2_0222;
int length2 = CamelliaEngine.SBOX1_1110.Length;
uint num6 = skey[(int)num5];
uint num7 = s[0];
s[0] = num7;
num6 += num7;
s[0] = num6;
}
// Token: 0x0600B708 RID: 46856 RVA: 0x002845B8 File Offset: 0x002827B8
[Token(Token = "0x600B708")]
[Address(RVA = "0x1A6A9E0", Offset = "0x1A697E0", VA = "0x181A6A9E0")]
private static void camelliaFLs(uint[] s, uint[] fkey, int keyoff)
{
s[0] = typeof(CamelliaEngine).TypeHandle;
int length = s.Length;
int num = keyoff + 1;
uint num2 = fkey[num];
s[1] = num2;
}
// Token: 0x0600B709 RID: 46857 RVA: 0x002845F4 File Offset: 0x002827F4
[Token(Token = "0x600B709")]
[Address(RVA = "0x1A6C440", Offset = "0x1A6B240", VA = "0x181A6C440")]
private void setKey(bool forEncryption, byte[] key)
{
/*
An exception occurred when decompiling this method (0600B709)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.CamelliaEngine::setKey(System.Boolean,System.Byte[])
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_A98:
stloc:uint32(var_223_A9F, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(0)))
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_169_824), ldc.i4:int32(0), ldloc:uint32(var_223_A9F))
stloc:uint32[](var_224_AB1, ldfld:uint32[](CamelliaEngine::kw, ldloc:CamelliaEngine(this)))
stloc:uint32(var_225_ABA, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(0)))
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_224_AB1), ldc.i4:int32(0), ldloc:uint32(var_225_ABA))
stloc:uint32[](var_226_ACC, ldfld:uint32[](CamelliaEngine::kw, ldloc:CamelliaEngine(this)))
stloc:uint32(var_227_AD5, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(1)))
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_226_ACC), ldc.i4:int32(1), ldloc:uint32(var_227_AD5))
stloc:uint32[](var_228_AE7, ldfld:uint32[](CamelliaEngine::kw, ldloc:CamelliaEngine(this)))
stloc:uint32(var_229_AF0, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_1_06), ldc.i4:int32(1)))
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_228_AE7), ldc.i4:int32(1), ldloc:uint32(var_229_AF0))
stloc:uint32[](var_230_B02, ldfld:uint32[](CamelliaEngine::subkey, ldloc:CamelliaEngine(this)))
stloc:int32(var_231_B05, ldc.i4:int32(0))
call:void(CamelliaEngine::roldq, ldc.i4:int32(15), ldloc:uint32[](var_1_06), ldloc:int32(var_231_B05), ldloc:uint32[](var_230_B02), ldloc:uint64[exp:int32](var_232))
stloc:uint32[](var_233_B1B, ldfld:uint32[](CamelliaEngine::subkey, ldloc:CamelliaEngine(this)))
stloc:int32(var_234_B1E, ldc.i4:int32(0))
call:void(CamelliaEngine::roldq, ldc.i4:int32(30), ldloc:uint32[](var_1_06), ldloc:int32(var_234_B1E), ldloc:uint32[](var_233_B1B), ldloc:uint64[exp:int32](var_235))
stloc:int32(var_236_B2F, ldc.i4:int32(0))
call:void(CamelliaEngine::roldq, ldc.i4:int32(15), ldloc:uint32[](var_1_06), ldloc:int32(var_236_B2F), ldloc:uint32[](var_7_1C), ldloc:int32(var_9_259))
stloc:uint32[](var_237_B45, ldfld:uint32[](CamelliaEngine::subkey, ldloc:CamelliaEngine(this)))
stloc:uint32(var_238_B4F, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_7_1C), ldc.i4:int32(1)))
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_237_B45), ldc.i4:int32(9), ldloc:uint32(var_238_B4F))
stloc:uint32[](var_239_B62, ldfld:uint32[](CamelliaEngine::subkey, ldloc:CamelliaEngine(this)))
stloc:uint32(var_240_B6C, ldelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_7_1C), ldc.i4:int32(1)))
stelem:uint32([mscorlib]System.UInt32, ldloc:uint32[](var_239_B62), ldc.i4:int32(9), ldloc:uint32(var_240_B6C))
stloc:int32(var_241_B7A, ldc.i4:int32(0))
stloc:uint32[](var_242_B82, ldfld:uint32[](CamelliaEngine::ke, ldloc:CamelliaEngine(this)))
call:void(CamelliaEngine::roldq, ldc.i4:int32(17), ldloc:uint32[](var_1_06), ldloc:int32(var_241_B7A), ldloc:uint32[](var_242_B82), ldloc:uint64[exp:int32](var_243))
}
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 1660
*/;
}
// Token: 0x0600B70A RID: 46858 RVA: 0x00285194 File Offset: 0x00283394
[Token(Token = "0x600B70A")]
[Address(RVA = "0x1A6B280", Offset = "0x1A6A080", VA = "0x181A6B280")]
private int processBlock128(byte[] input, int inOff, byte[] output, int outOff)
{
int num = 0;
uint[] array = this.state;
num++;
byte b;
num += (int)b;
array[0] = (uint)num;
uint[] array2 = this.state;
uint[] array3 = this.kw;
num++;
uint[] array4 = this.state;
uint[] array5 = this.subkey;
int num2 = 0;
CamelliaEngine.camelliaF2(array4, array5, num2);
uint[] array6 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array6, 4);
uint[] array7 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array7, 8);
uint[] array8 = this.ke;
uint[] array9 = this.state;
int num3 = 0;
CamelliaEngine.camelliaFLs(array9, array8, num3);
uint[] array10 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array10, 12);
uint[] array11 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array11, 16);
uint[] array12 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array12, 20);
uint[] array13 = this.ke;
CamelliaEngine.camelliaFLs(this.state, array13, 4);
uint[] array14 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array14, 24);
uint[] array15 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array15, 28);
uint[] array16 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array16, 32);
uint[] array17 = this.state;
uint[] array18 = this.kw;
uint[] array19 = this.state;
uint[] array20 = this.kw;
uint[] array21 = this.state;
uint[] array22 = this.kw;
uint[] array23 = this.state;
uint[] array24 = this.kw;
uint[] array25 = this.state;
num++;
uint[] array26 = this.state;
num++;
uint[] array27 = this.state;
num++;
uint[] array28 = this.state;
num++;
throw new NullReferenceException();
}
// Token: 0x0600B70B RID: 46859 RVA: 0x0028534C File Offset: 0x0028354C
[Token(Token = "0x600B70B")]
[Address(RVA = "0x1A6B7F0", Offset = "0x1A6A5F0", VA = "0x181A6B7F0")]
private int processBlock192or256(byte[] input, int inOff, byte[] output, int outOff)
{
int num = 0;
uint[] array = this.state;
num++;
byte b;
num += (int)b;
array[0] = (uint)num;
uint[] array2 = this.state;
uint[] array3 = this.kw;
num++;
uint[] array4 = this.state;
uint[] array5 = this.subkey;
int num2 = 0;
CamelliaEngine.camelliaF2(array4, array5, num2);
uint[] array6 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array6, 4);
uint[] array7 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array7, 8);
uint[] array8 = this.ke;
uint[] array9 = this.state;
int num3 = 0;
CamelliaEngine.camelliaFLs(array9, array8, num3);
uint[] array10 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array10, 12);
uint[] array11 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array11, 16);
uint[] array12 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array12, 20);
uint[] array13 = this.ke;
CamelliaEngine.camelliaFLs(this.state, array13, 4);
uint[] array14 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array14, 24);
uint[] array15 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array15, 28);
uint[] array16 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array16, 32);
uint[] array17 = this.ke;
CamelliaEngine.camelliaFLs(this.state, array17, 8);
uint[] array18 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array18, 36);
uint[] array19 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array19, 40);
uint[] array20 = this.subkey;
CamelliaEngine.camelliaF2(this.state, array20, 44);
uint[] array21 = this.state;
uint[] array22 = this.kw;
uint[] array23 = this.state;
uint[] array24 = this.kw;
uint[] array25 = this.state;
uint[] array26 = this.kw;
uint[] array27 = this.state;
uint[] array28 = this.kw;
uint[] array29 = this.state;
num++;
uint[] array30 = this.state;
num++;
uint[] array31 = this.state;
num++;
uint[] array32 = this.state;
num++;
throw new NullReferenceException();
}
// Token: 0x0600B70C RID: 46860 RVA: 0x00285560 File Offset: 0x00283760
[Token(Token = "0x600B70C")]
[Address(RVA = "0x1A6A380", Offset = "0x1A69180", VA = "0x181A6A380")]
public CamelliaEngine()
{
uint[] array = new uint[96];
this.subkey = array;
uint[] array2 = new uint[8];
this.kw = array2;
uint[] array3 = new uint[12];
this.ke = array3;
uint[] array4 = new uint[4];
this.state = array4;
this.Reset();
}
// Token: 0x0600B70D RID: 46861 RVA: 0x002855B0 File Offset: 0x002837B0
[Token(Token = "0x600B70D")]
[Address(RVA = "0x1A69FE0", Offset = "0x1A68DE0", VA = "0x181A69FE0", Slot = "10")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (0600B70D)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.CamelliaEngine::Init(System.Boolean,BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.ICipherParameters)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_26:
stloc:ArgumentException(var_4_30, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("only simple KeyParameter expected.")))
}
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 1660
*/;
}
// Token: 0x17001CBC RID: 7356
// (get) Token: 0x0600B70E RID: 46862 RVA: 0x002855F0 File Offset: 0x002837F0
[Token(Token = "0x17001CBC")]
public virtual string AlgorithmName
{
[Token(Token = "0x600B70E")]
[Address(RVA = "0x1A6B230", Offset = "0x1A6A030", VA = "0x181A6B230", Slot = "11")]
get
{
return "Camellia";
}
}
// Token: 0x17001CBD RID: 7357
// (get) Token: 0x0600B70F RID: 46863 RVA: 0x00285604 File Offset: 0x00283804
[Token(Token = "0x17001CBD")]
public virtual bool IsPartialBlockOkay
{
[Token(Token = "0x600B70F")]
[Address(RVA = "0x403930", Offset = "0x402730", VA = "0x180403930", Slot = "12")]
get
{
}
}
// Token: 0x0600B710 RID: 46864 RVA: 0x00285614 File Offset: 0x00283814
[Token(Token = "0x600B710")]
[Address(RVA = "0x4B6B10", Offset = "0x4B5910", VA = "0x1804B6B10", Slot = "13")]
public virtual int GetBlockSize()
{
return 16;
}
// Token: 0x0600B711 RID: 46865 RVA: 0x00285624 File Offset: 0x00283824
[Token(Token = "0x600B711")]
[Address(RVA = "0x1A6A140", Offset = "0x1A68F40", VA = "0x181A6A140", Slot = "14")]
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (0600B711)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines.CamelliaEngine::ProcessBlock(System.Byte[],System.Int32,System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_24:
stloc:InvalidOperationException(var_3_2E, newobj:InvalidOperationException(InvalidOperationException::.ctor, ldstr:string("Camellia 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.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 1660
*/;
}
// Token: 0x0600B712 RID: 46866 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600B712")]
[Address(RVA = "0x402080", Offset = "0x400E80", VA = "0x180402080", Slot = "15")]
public virtual void Reset()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600B713 RID: 46867 RVA: 0x00285660 File Offset: 0x00283860
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600B713")]
[Address(RVA = "0x1A6A240", Offset = "0x1A69040", VA = "0x181A6A240")]
static CamelliaEngine()
{
uint[] array = new uint[12];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.AE843E1C1136C908565A6D4E04E8564B69465B3B).FieldHandle);
CamelliaEngine.SIGMA = array;
uint[] array2 = new uint[256];
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.B1108EE6609DB783B2EC606B3BFDD544A7D4C2B3).FieldHandle);
CamelliaEngine.SBOX1_1110 = array2;
uint[] array3 = new uint[256];
RuntimeHelpers.InitializeArray(array3, fieldof(<PrivateImplementationDetails>.14F6FAB1B4065EBADBBA4A3661ADE689FF444EDD).FieldHandle);
CamelliaEngine.SBOX4_4404 = array3;
uint[] array4 = new uint[256];
RuntimeHelpers.InitializeArray(array4, fieldof(<PrivateImplementationDetails>.B718C95C87C6B65DFA29D58A10442CEC9EBBDF1F).FieldHandle);
CamelliaEngine.SBOX2_0222 = array4;
uint[] array5 = new uint[256];
RuntimeHelpers.InitializeArray(array5, fieldof(<PrivateImplementationDetails>.124B1C35B19149213F8F7D40AA8E0ABA15DD70EC).FieldHandle);
CamelliaEngine.SBOX3_3033 = array5;
}
// Token: 0x04007413 RID: 29715
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4007413")]
private bool initialised;
// Token: 0x04007414 RID: 29716
[FieldOffset(Offset = "0x11")]
[Token(Token = "0x4007414")]
private bool _keyIs128;
// Token: 0x04007415 RID: 29717
[Token(Token = "0x4007415")]
private const int BLOCK_SIZE = 16;
// Token: 0x04007416 RID: 29718
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4007416")]
private uint[] subkey;
// Token: 0x04007417 RID: 29719
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x4007417")]
private uint[] kw;
// Token: 0x04007418 RID: 29720
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x4007418")]
private uint[] ke;
// Token: 0x04007419 RID: 29721
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x4007419")]
private uint[] state;
// Token: 0x0400741A RID: 29722
[Token(Token = "0x400741A")]
private static readonly uint[] SIGMA;
// Token: 0x0400741B RID: 29723
[Token(Token = "0x400741B")]
private static readonly uint[] SBOX1_1110;
// Token: 0x0400741C RID: 29724
[Token(Token = "0x400741C")]
private static readonly uint[] SBOX4_4404;
// Token: 0x0400741D RID: 29725
[Token(Token = "0x400741D")]
private static readonly uint[] SBOX2_0222;
// Token: 0x0400741E RID: 29726
[Token(Token = "0x400741E")]
private static readonly uint[] SBOX3_3033;
}
}