Files
27Aug2021-Cpp2IL-Dump/Assembly-CSharp/BestHTTP/SecureProtocol/Org/BouncyCastle/Crypto/Engines/CamelliaEngine.cs
T
niko c12fbe3fc6 m
2026-04-12 16:51:38 +02:00

561 lines
26 KiB
C#

using System;
using System.Runtime.CompilerServices;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines
{
// Token: 0x02001D65 RID: 7525
[Token(Token = "0x2001D65")]
public class CamelliaEngine : IBlockCipher
{
// Token: 0x0600BACD RID: 47821 RVA: 0x0028D31C File Offset: 0x0028B51C
[Token(Token = "0x600BACD")]
[Address(RVA = "0x249A960", Offset = "0x2499960", VA = "0x18249A960")]
private static uint rightRotate(uint x, int s)
{
return x;
}
// Token: 0x0600BACE RID: 47822 RVA: 0x0028D32C File Offset: 0x0028B52C
[Token(Token = "0x600BACE")]
[Address(RVA = "0x2499E10", Offset = "0x2498E10", VA = "0x182499E10")]
private static uint leftRotate(uint x, int s)
{
return x;
}
// Token: 0x0600BACF RID: 47823 RVA: 0x0028D33C File Offset: 0x0028B53C
[Token(Token = "0x600BACF")]
[Address(RVA = "0x249A980", Offset = "0x2499980", VA = "0x18249A980")]
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: 0x0600BAD0 RID: 47824 RVA: 0x0028D3DC File Offset: 0x0028B5DC
[Token(Token = "0x600BAD0")]
[Address(RVA = "0x2499770", Offset = "0x2498770", VA = "0x182499770")]
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: 0x0600BAD1 RID: 47825 RVA: 0x0028D47C File Offset: 0x0028B67C
[Token(Token = "0x600BAD1")]
[Address(RVA = "0x249ACC0", Offset = "0x2499CC0", VA = "0x18249ACC0")]
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: 0x0600BAD2 RID: 47826 RVA: 0x0028D528 File Offset: 0x0028B728
[Token(Token = "0x600BAD2")]
[Address(RVA = "0x2499AB0", Offset = "0x2498AB0", VA = "0x182499AB0")]
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: 0x0600BAD3 RID: 47827 RVA: 0x0028D5C4 File Offset: 0x0028B7C4
[Token(Token = "0x600BAD3")]
[Address(RVA = "0x2498FC0", Offset = "0x2497FC0", VA = "0x182498FC0")]
private static uint bytes2uint(byte[] src, int offset)
{
int num = 0;
byte b;
num += (int)b;
throw new NullReferenceException();
}
// Token: 0x0600BAD4 RID: 47828 RVA: 0x0028D5DC File Offset: 0x0028B7DC
[Token(Token = "0x600BAD4")]
[Address(RVA = "0x249CE30", Offset = "0x249BE30", VA = "0x18249CE30")]
private static void uint2bytes(uint word, byte[] dst, int offset)
{
int num = 0;
num++;
}
// Token: 0x0600BAD5 RID: 47829 RVA: 0x0028D5F8 File Offset: 0x0028B7F8
[Token(Token = "0x600BAD5")]
[Address(RVA = "0x2499020", Offset = "0x2498020", VA = "0x182499020")]
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: 0x0600BAD6 RID: 47830 RVA: 0x0028D6C4 File Offset: 0x0028B8C4
[Token(Token = "0x600BAD6")]
[Address(RVA = "0x2499590", Offset = "0x2498590", VA = "0x182499590")]
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: 0x0600BAD7 RID: 47831 RVA: 0x0028D700 File Offset: 0x0028B900
[Token(Token = "0x600BAD7")]
[Address(RVA = "0x249AFF0", Offset = "0x2499FF0", VA = "0x18249AFF0")]
private void setKey(bool forEncryption, byte[] key)
{
/*
An exception occurred when decompiling this method (0600BAD7)
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 1663
*/;
}
// Token: 0x0600BAD8 RID: 47832 RVA: 0x0028E2A0 File Offset: 0x0028C4A0
[Token(Token = "0x600BAD8")]
[Address(RVA = "0x2499E30", Offset = "0x2498E30", VA = "0x182499E30")]
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: 0x0600BAD9 RID: 47833 RVA: 0x0028E458 File Offset: 0x0028C658
[Token(Token = "0x600BAD9")]
[Address(RVA = "0x249A3A0", Offset = "0x24993A0", VA = "0x18249A3A0")]
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: 0x0600BADA RID: 47834 RVA: 0x0028E66C File Offset: 0x0028C86C
[Token(Token = "0x600BADA")]
[Address(RVA = "0x2498F30", Offset = "0x2497F30", VA = "0x182498F30")]
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: 0x0600BADB RID: 47835 RVA: 0x0028E6BC File Offset: 0x0028C8BC
[Token(Token = "0x600BADB")]
[Address(RVA = "0x2498B90", Offset = "0x2497B90", VA = "0x182498B90", Slot = "10")]
public virtual void Init(bool forEncryption, ICipherParameters parameters)
{
/*
An exception occurred when decompiling this method (0600BADB)
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 1663
*/;
}
// Token: 0x17001D59 RID: 7513
// (get) Token: 0x0600BADC RID: 47836 RVA: 0x0028E6FC File Offset: 0x0028C8FC
[Token(Token = "0x17001D59")]
public virtual string AlgorithmName
{
[Token(Token = "0x600BADC")]
[Address(RVA = "0x2499DE0", Offset = "0x2498DE0", VA = "0x182499DE0", Slot = "11")]
get
{
return "Camellia";
}
}
// Token: 0x17001D5A RID: 7514
// (get) Token: 0x0600BADD RID: 47837 RVA: 0x0028E710 File Offset: 0x0028C910
[Token(Token = "0x17001D5A")]
public virtual bool IsPartialBlockOkay
{
[Token(Token = "0x600BADD")]
[Address(RVA = "0x424690", Offset = "0x423690", VA = "0x180424690", Slot = "12")]
get
{
}
}
// Token: 0x0600BADE RID: 47838 RVA: 0x0028E720 File Offset: 0x0028C920
[Token(Token = "0x600BADE")]
[Address(RVA = "0x8BB9C0", Offset = "0x8BA9C0", VA = "0x1808BB9C0", Slot = "13")]
public virtual int GetBlockSize()
{
return 16;
}
// Token: 0x0600BADF RID: 47839 RVA: 0x0028E730 File Offset: 0x0028C930
[Token(Token = "0x600BADF")]
[Address(RVA = "0x2498CF0", Offset = "0x2497CF0", VA = "0x182498CF0", Slot = "14")]
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
{
/*
An exception occurred when decompiling this method (0600BADF)
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 1663
*/;
}
// Token: 0x0600BAE0 RID: 47840 RVA: 0x0000220F File Offset: 0x0000040F
[Token(Token = "0x600BAE0")]
[Address(RVA = "0x4242D0", Offset = "0x4232D0", VA = "0x1804242D0", Slot = "15")]
public virtual void Reset()
{
throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
}
// Token: 0x0600BAE1 RID: 47841 RVA: 0x0028E76C File Offset: 0x0028C96C
// Note: this type is marked as 'beforefieldinit'.
[Token(Token = "0x600BAE1")]
[Address(RVA = "0x2498DF0", Offset = "0x2497DF0", VA = "0x182498DF0")]
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: 0x040075CC RID: 30156
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x40075CC")]
private bool initialised;
// Token: 0x040075CD RID: 30157
[FieldOffset(Offset = "0x11")]
[Token(Token = "0x40075CD")]
private bool _keyIs128;
// Token: 0x040075CE RID: 30158
[Token(Token = "0x40075CE")]
private const int BLOCK_SIZE = 16;
// Token: 0x040075CF RID: 30159
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x40075CF")]
private uint[] subkey;
// Token: 0x040075D0 RID: 30160
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x40075D0")]
private uint[] kw;
// Token: 0x040075D1 RID: 30161
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x40075D1")]
private uint[] ke;
// Token: 0x040075D2 RID: 30162
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x40075D2")]
private uint[] state;
// Token: 0x040075D3 RID: 30163
[Token(Token = "0x40075D3")]
private static readonly uint[] SIGMA;
// Token: 0x040075D4 RID: 30164
[Token(Token = "0x40075D4")]
private static readonly uint[] SBOX1_1110;
// Token: 0x040075D5 RID: 30165
[Token(Token = "0x40075D5")]
private static readonly uint[] SBOX4_4404;
// Token: 0x040075D6 RID: 30166
[Token(Token = "0x40075D6")]
private static readonly uint[] SBOX2_0222;
// Token: 0x040075D7 RID: 30167
[Token(Token = "0x40075D7")]
private static readonly uint[] SBOX3_3033;
}
}