This commit is contained in:
niko
2026-04-12 16:51:38 +02:00
parent 1b6f6d81d0
commit c12fbe3fc6
17828 changed files with 2994770 additions and 0 deletions
@@ -0,0 +1,1124 @@
using System;
using System.Collections;
using System.Runtime.CompilerServices;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Engines;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters;
using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities;
using Cpp2IlInjected;
namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests
{
// Token: 0x02001DDE RID: 7646
[Token(Token = "0x2001DDE")]
public class SkeinEngine : IMemoable
{
// Token: 0x0600BFA5 RID: 49061 RVA: 0x002B1F30 File Offset: 0x002B0130
[Token(Token = "0x600BFA5")]
[Address(RVA = "0x2912500", Offset = "0x2911500", VA = "0x182912500")]
static SkeinEngine()
{
ulong[] array = new ulong[4];
RuntimeHelpers.InitializeArray(array, fieldof(<PrivateImplementationDetails>.FCDDAA37B8499E00EB7B606D8540AA64DE5AE4D4).FieldHandle);
SkeinEngine.InitialState(256, 128, array);
RuntimeHelpers.InitializeArray(new ulong[4], fieldof(<PrivateImplementationDetails>.3C3704DB6466D48DD40FE189070F1896D1D45C8B).FieldHandle);
RuntimeHelpers.InitializeArray(new ulong[4], fieldof(<PrivateImplementationDetails>.FD9088D5287E3E3A6699200CB6E5DE3E9FDEDD9F).FieldHandle);
ulong[] array2 = new ulong[4];
RuntimeHelpers.InitializeArray(array2, fieldof(<PrivateImplementationDetails>.0B1E7265E67D2458D8EB536A4B36380A5BF6E731).FieldHandle);
SkeinEngine.InitialState(256, 256, array2);
ulong[] array3 = new ulong[8];
RuntimeHelpers.InitializeArray(array3, fieldof(<PrivateImplementationDetails>.DA7CFA4F9698F5D02C5D90A5858F65EE43B4D564).FieldHandle);
SkeinEngine.InitialState(512, 128, array3);
ulong[] array4 = new ulong[8];
RuntimeHelpers.InitializeArray(array4, fieldof(<PrivateImplementationDetails>.959C1F7BD85779AAF7AA136A20A9C399A5019AEC).FieldHandle);
SkeinEngine.InitialState(512, 160, array4);
ulong[] array5 = new ulong[8];
RuntimeHelpers.InitializeArray(array5, fieldof(<PrivateImplementationDetails>.5318DA9ACB77B4E0953DA6BF6B04DF138D74EA1E).FieldHandle);
SkeinEngine.InitialState(512, 224, array5);
ulong[] array6 = new ulong[8];
RuntimeHelpers.InitializeArray(array6, fieldof(<PrivateImplementationDetails>.F0AEF81E2E3EC0843206EBA7D65BCD1AF83DE7C9).FieldHandle);
SkeinEngine.InitialState(512, 384, array6);
ulong[] array7 = new ulong[8];
RuntimeHelpers.InitializeArray(array7, fieldof(<PrivateImplementationDetails>.118FE9754A9699004D478E4BF686021154D96EAD).FieldHandle);
SkeinEngine.InitialState(512, 512, array7);
}
// Token: 0x0600BFA6 RID: 49062 RVA: 0x002B2064 File Offset: 0x002B0264
[Token(Token = "0x600BFA6")]
[Address(RVA = "0x2911DB0", Offset = "0x2910DB0", VA = "0x182911DB0")]
private static void InitialState(int blockSize, int outputSize, ulong[] state)
{
IDictionary initial_STATES = SkeinEngine.INITIAL_STATES;
int num = 0;
if (num < state)
{
num += num;
num++;
}
}
// Token: 0x0600BFA7 RID: 49063 RVA: 0x002B208C File Offset: 0x002B028C
[Token(Token = "0x600BFA7")]
[Address(RVA = "0x29124F0", Offset = "0x29114F0", VA = "0x1829124F0")]
private static int VariantIdentifier(int blockSizeBytes, int outputSizeBytes)
{
return outputSizeBytes;
}
// Token: 0x0600BFA8 RID: 49064 RVA: 0x002B209C File Offset: 0x002B029C
[Token(Token = "0x600BFA8")]
[Address(RVA = "0x2912770", Offset = "0x2911770", VA = "0x182912770")]
public SkeinEngine(int blockSizeBits, int outputSizeBits)
{
/*
An exception occurred when decompiling this method (0600BFA8)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.SkeinEngine::.ctor(System.Int32,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_A7:
stloc:ArgumentException(var_12_B7, newobj:ArgumentException(ArgumentException::.ctor, call:string(string::Concat, ldstr:string[exp:object]("Output size must be a multiple of 8 bits. :"), ldloc:int32[exp:object](outputSizeBits))))
}
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: 0x0600BFA9 RID: 49065 RVA: 0x002B2164 File Offset: 0x002B0364
[Token(Token = "0x600BFA9")]
[Address(RVA = "0x2912960", Offset = "0x2911960", VA = "0x182912960")]
public SkeinEngine(SkeinEngine engine)
{
bool isPartialBlockOkay = engine.threefish.IsPartialBlockOkay;
this.CopyIn(engine);
}
// Token: 0x0600BFAA RID: 49066 RVA: 0x002B218C File Offset: 0x002B038C
[Token(Token = "0x600BFAA")]
[Address(RVA = "0x2910A80", Offset = "0x290FA80", VA = "0x182910A80")]
private void CopyIn(SkeinEngine engine)
{
SkeinEngine.UBI ubi = this.ubi;
SkeinEngine.UBI ubi2 = engine.ubi;
byte[] currentBlock = ubi2.currentBlock;
byte[] currentBlock2 = ubi.currentBlock;
byte[] array = Arrays.Clone(currentBlock, currentBlock2);
ulong[] message = ubi.message;
ubi.currentBlock = array;
int currentOffset = ubi2.currentOffset;
ubi.currentOffset = currentOffset;
ulong[] array2 = Arrays.Clone(ubi2.message, message);
ubi.message = array2;
SkeinEngine.UbiTweak tweak = ubi.tweak;
SkeinEngine.UbiTweak tweak2 = ubi2.tweak;
ulong[] tweak3 = tweak2.tweak;
ulong[] tweak4 = tweak.tweak;
ulong[] array3 = Arrays.Clone(tweak3, tweak4);
tweak.tweak = array3;
bool extendedPosition = tweak2.extendedPosition;
tweak.extendedPosition = extendedPosition;
ulong[] array4 = engine.chain;
ulong[] array5 = this.chain;
ulong[] array6 = Arrays.Clone(array4, array5);
ulong[] array7 = this.initialState;
this.chain = array6;
ulong[] array8 = Arrays.Clone(engine.initialState, array7);
byte[] array9 = this.key;
this.initialState = array8;
byte[] array10 = Arrays.Clone(engine.key, array9);
SkeinEngine.Parameter[] array11 = this.preMessageParameters;
this.key = array10;
SkeinEngine.Parameter[] array12 = SkeinEngine.Clone(engine.preMessageParameters, array11);
SkeinEngine.Parameter[] array13 = this.postMessageParameters;
this.preMessageParameters = array12;
SkeinEngine.Parameter[] array14 = SkeinEngine.Clone(engine.postMessageParameters, array13);
this.postMessageParameters = array14;
}
// Token: 0x0600BFAB RID: 49067 RVA: 0x002B22E4 File Offset: 0x002B04E4
[Token(Token = "0x600BFAB")]
[Address(RVA = "0x29109E0", Offset = "0x290F9E0", VA = "0x1829109E0")]
private static SkeinEngine.Parameter[] Clone(SkeinEngine.Parameter[] data, SkeinEngine.Parameter[] existing)
{
if (data != 0)
{
if (existing != 0)
{
int length = data.Length;
if (existing.Length == length)
{
goto IL_24;
}
}
SkeinEngine.Parameter[] array = new SkeinEngine.Parameter[data.Length];
IL_24:
int length2 = array.Length;
int num = 0;
int num2 = 0;
Array.Copy(data, num2, array, num, length2);
return array;
}
throw new NullReferenceException();
}
// Token: 0x0600BFAC RID: 49068 RVA: 0x002B2338 File Offset: 0x002B0538
[Token(Token = "0x600BFAC")]
[Address(RVA = "0x2910C90", Offset = "0x290FC90", VA = "0x182910C90", Slot = "4")]
public IMemoable Copy()
{
bool isPartialBlockOkay = this.threefish.IsPartialBlockOkay;
SkeinEngine skeinEngine;
skeinEngine.CopyIn(this);
throw new NullReferenceException();
}
// Token: 0x0600BFAD RID: 49069 RVA: 0x002B2360 File Offset: 0x002B0560
[Token(Token = "0x600BFAD")]
[Address(RVA = "0x29121A0", Offset = "0x29111A0", VA = "0x1829121A0", Slot = "5")]
public void Reset(IMemoable other)
{
/*
An exception occurred when decompiling this method (0600BFAD)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.SkeinEngine::Reset(BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IMemoable)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_2D:
stloc:MemoableResetException(var_4_37, newobj:MemoableResetException(MemoableResetException::.ctor, ldstr:string("Incompatible parameters in provided SkeinEngine.")))
}
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: 0x17001DC3 RID: 7619
// (get) Token: 0x0600BFAE RID: 49070 RVA: 0x002B23A8 File Offset: 0x002B05A8
[Token(Token = "0x17001DC3")]
public int OutputSize
{
[Token(Token = "0x600BFAE")]
[Address(RVA = "0x411540", Offset = "0x410540", VA = "0x180411540")]
get
{
return this.outputSizeBytes;
}
}
// Token: 0x17001DC4 RID: 7620
// (get) Token: 0x0600BFAF RID: 49071 RVA: 0x002B23BC File Offset: 0x002B05BC
[Token(Token = "0x17001DC4")]
public int BlockSize
{
[Token(Token = "0x600BFAF")]
[Address(RVA = "0x4DAE40", Offset = "0x4D9E40", VA = "0x1804DAE40")]
get
{
string algorithmName = ((IBlockCipher)this.threefish).AlgorithmName;
throw new NullReferenceException();
}
}
// Token: 0x0600BFB0 RID: 49072 RVA: 0x002B23DC File Offset: 0x002B05DC
[Token(Token = "0x600BFB0")]
[Address(RVA = "0x2911CF0", Offset = "0x2910CF0", VA = "0x182911CF0")]
public void Init(SkeinParameters parameters)
{
int num = 0;
this.chain = num;
this.key = num;
this.preMessageParameters = num;
this.postMessageParameters = num;
if (parameters != 0)
{
byte[] array = parameters.GetKey();
IDictionary parameters2 = parameters.parameters;
this.InitParams(parameters2);
}
this.CreateInitialState();
this.UbiInit(48);
}
// Token: 0x0600BFB1 RID: 49073 RVA: 0x002B2434 File Offset: 0x002B0634
[Token(Token = "0x600BFB1")]
[Address(RVA = "0x29118F0", Offset = "0x29108F0", VA = "0x1829118F0")]
private void InitParams(IDictionary parameters)
{
int num;
int num3;
do
{
IList list = Platform.CreateArrayList();
IList list2 = Platform.CreateArrayList();
num = 0;
if (num < parameters)
{
num += num;
num++;
}
int num2 = 0;
if (list2 == 0)
{
goto IL_8C;
}
if (num < num2)
{
num += num;
num++;
}
num3 = num;
num += num;
num++;
if (num == 0)
{
num += 19;
num++;
num += 19;
num += 19;
}
}
while (num == 0);
if (num3 != 0)
{
SkeinEngine.Parameter parameter;
parameter.type = num3;
parameter.value = num;
}
IL_8C:
SkeinEngine.Parameter[] array = new SkeinEngine.Parameter[0];
SkeinEngine.Parameter[] array2 = new SkeinEngine.Parameter[array];
}
// Token: 0x0600BFB2 RID: 49074 RVA: 0x002B24EC File Offset: 0x002B06EC
[Token(Token = "0x600BFB2")]
[Address(RVA = "0x2910D30", Offset = "0x290FD30", VA = "0x182910D30")]
private void CreateInitialState()
{
bool isPartialBlockOkay;
int num2;
do
{
ThreefishEngine threefishEngine = this.threefish;
IDictionary initial_STATES = SkeinEngine.INITIAL_STATES;
isPartialBlockOkay = threefishEngine.IsPartialBlockOkay;
int num = this.outputSizeBytes;
num2 = 0;
if (!isPartialBlockOkay)
{
}
}
while (!isPartialBlockOkay);
if (this.key == num2 && isPartialBlockOkay)
{
ulong[] array;
this.chain = array;
}
bool isPartialBlockOkay2 = this.threefish.IsPartialBlockOkay;
ulong[] array2 = new ulong[0];
byte[] array3 = this.key;
this.chain = array2;
int length;
int num5;
if (array3 != 0)
{
int num3 = 0;
this.UbiInit(num3);
SkeinEngine.UBI ubi = this.ubi;
ulong[] array4 = this.chain;
int num4 = 0;
length = array3.Length;
ubi.Update(array3, num4, length, array4);
SkeinEngine.UBI ubi2 = this.ubi;
ulong[] array5 = this.chain;
num5 = 0;
ubi2.DoFinal(array5);
}
byte[] array6 = new byte[32];
int num6 = 0;
SkeinEngine.Configuration configuration;
configuration.bytes = array6;
configuration.FieldGetter(num6, num5, length);
byte[] bytes = configuration.bytes;
byte[] bytes2 = configuration.bytes;
byte[] bytes3 = configuration.bytes;
byte[] bytes4 = configuration.bytes;
byte[] bytes5 = configuration.bytes;
configuration.bytes[0] = (byte)num2;
byte[] bytes6 = configuration.bytes;
this.UbiInit(4);
SkeinEngine.UBI ubi3 = this.ubi;
ulong[] array7 = this.chain;
int num7 = 0;
int length2 = bytes6.Length;
ubi3.Update(bytes6, num7, length2, array7);
SkeinEngine.UBI ubi4 = this.ubi;
ulong[] array8 = this.chain;
ubi4.DoFinal(array8);
SkeinEngine.Parameter[] array9 = this.preMessageParameters;
if (array9 != 0 && num2 < array9.Length)
{
SkeinEngine.Parameter parameter = array9[num2];
SkeinEngine.UBI ubi5 = this.ubi;
byte[] value = parameter.value;
int type = parameter.type;
SkeinEngine.UbiTweak tweak = ubi5.tweak;
tweak.tweak[0] = (ulong)num2;
tweak.tweak[1] = (ulong)num2;
ulong[] tweak2 = tweak.tweak;
tweak.extendedPosition = num2 != 0;
ubi5.tweak.tweak[1] = (ulong)type;
ubi5.currentOffset = num2;
SkeinEngine.UBI ubi6 = this.ubi;
ulong[] array10 = this.chain;
int num8 = 0;
int length3 = value.Length;
ubi6.Update(value, num8, length3, array10);
SkeinEngine.UBI ubi7 = this.ubi;
ulong[] array11 = this.chain;
int num9 = ubi7.currentOffset;
int length4 = ubi7.currentBlock.Length;
if (num9 < length4)
{
num9++;
}
ulong[] tweak3 = ubi7.tweak.tweak;
ubi7.ProcessBlock(array11);
SkeinEngine.Parameter[] array12 = this.preMessageParameters;
num2++;
}
ulong[] array13 = Arrays.Clone(this.chain);
this.initialState = array13;
}
// Token: 0x0600BFB3 RID: 49075 RVA: 0x002B2798 File Offset: 0x002B0998
[Token(Token = "0x600BFB3")]
[Address(RVA = "0x2912150", Offset = "0x2911150", VA = "0x182912150")]
public void Reset()
{
ulong[] array = this.chain;
int length = array.Length;
int num = 0;
ulong[] array2 = this.initialState;
int num2 = 0;
Array.Copy(array2, num2, array, num, length);
this.UbiInit(48);
}
// Token: 0x0600BFB4 RID: 49076 RVA: 0x002B27D8 File Offset: 0x002B09D8
[Token(Token = "0x600BFB4")]
[Address(RVA = "0x29122C0", Offset = "0x29112C0", VA = "0x1829122C0")]
private void UbiComplete(int type, byte[] value)
{
this.UbiInit(type);
SkeinEngine.UBI ubi = this.ubi;
ulong[] array = this.chain;
int num = 0;
int length = value.Length;
ubi.Update(value, num, length, array);
SkeinEngine.UBI ubi2 = this.ubi;
ulong[] array2 = this.chain;
ubi2.DoFinal(array2);
}
// Token: 0x0600BFB5 RID: 49077 RVA: 0x002B282C File Offset: 0x002B0A2C
[Token(Token = "0x600BFB5")]
[Address(RVA = "0x2912360", Offset = "0x2911360", VA = "0x182912360")]
private void UbiInit(int type)
{
SkeinEngine.UBI ubi = this.ubi;
ubi.tweak.Reset();
ubi.tweak.tweak[1] = (ulong)type;
ubi.currentOffset = (int)((ulong)0L);
}
// Token: 0x0600BFB6 RID: 49078 RVA: 0x002B286C File Offset: 0x002B0A6C
[Token(Token = "0x600BFB6")]
[Address(RVA = "0x2912330", Offset = "0x2911330", VA = "0x182912330")]
private void UbiFinal()
{
SkeinEngine.UBI ubi = this.ubi;
ulong[] array = this.chain;
ubi.DoFinal(array);
}
// Token: 0x0600BFB7 RID: 49079 RVA: 0x002B2894 File Offset: 0x002B0A94
[Token(Token = "0x600BFB7")]
[Address(RVA = "0x2910970", Offset = "0x290F970", VA = "0x182910970")]
private void CheckInitialised()
{
/*
An exception occurred when decompiling this method (0600BFB7)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.SkeinEngine::CheckInitialised()
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_0C:
stloc:ArgumentException(var_0_16, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Skein engine is 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: 0x0600BFB8 RID: 49080 RVA: 0x002B28B8 File Offset: 0x002B0AB8
[Token(Token = "0x600BFB8")]
[Address(RVA = "0x29124A0", Offset = "0x29114A0", VA = "0x1829124A0")]
public void Update(byte inByte)
{
this.singleByte[0] = inByte;
byte[] array = this.singleByte;
int num = 0;
this.Update(array, num, 1);
}
// Token: 0x0600BFB9 RID: 49081 RVA: 0x002B28EC File Offset: 0x002B0AEC
[Token(Token = "0x600BFB9")]
[Address(RVA = "0x29123F0", Offset = "0x29113F0", VA = "0x1829123F0")]
public void Update(byte[] inBytes, int inOff, int len)
{
/*
An exception occurred when decompiling this method (0600BFB9)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.SkeinEngine::Update(System.Byte[],System.Int32,System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_1D:
stloc:ArgumentException(var_3_27, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Skein engine is 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: 0x0600BFBA RID: 49082 RVA: 0x002B2920 File Offset: 0x002B0B20
[Token(Token = "0x600BFBA")]
[Address(RVA = "0x29113A0", Offset = "0x29103A0", VA = "0x1829113A0")]
public int DoFinal(byte[] outBytes, int outOff)
{
/*
An exception occurred when decompiling this method (0600BFBA)
ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Digests.SkeinEngine::DoFinal(System.Byte[],System.Int32)
---> System.Exception: Basic block has to end with unconditional control flow.
{
IL_243:
stloc:ArgumentException(var_37_24D, newobj:ArgumentException(ArgumentException::.ctor, ldstr:string("Skein engine is 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: 0x0600BFBB RID: 49083 RVA: 0x002B2B7C File Offset: 0x002B0D7C
[Token(Token = "0x600BFBB")]
[Address(RVA = "0x2911EF0", Offset = "0x2910EF0", VA = "0x182911EF0")]
private void Output(ulong outputSequence, byte[] outBytes, int outOff, int outputBytes)
{
byte[] array = new byte[8];
int num = 0;
ThreefishEngine.WordToBytes(outputSequence, array, num);
ulong[] array2 = new ulong[this.chain.Length];
this.UbiInit(63);
SkeinEngine.UBI ubi = this.ubi;
int length = array.Length;
int num2 = 0;
ubi.Update(array, num2, length, array2);
this.ubi.DoFinal(array2);
int num3 = 0;
array2 += array2;
if (array2 > 0)
{
int num4;
if (num4 != 8)
{
ulong num5 = array2[num3];
int num6 = 0;
ThreefishEngine.WordToBytes(num5, array, num6);
}
ThreefishEngine.WordToBytes(array2[num3], outBytes, outOff);
num3++;
}
}
// Token: 0x04007901 RID: 30977
[Token(Token = "0x4007901")]
public const int SKEIN_256 = 256;
// Token: 0x04007902 RID: 30978
[Token(Token = "0x4007902")]
public const int SKEIN_512 = 512;
// Token: 0x04007903 RID: 30979
[Token(Token = "0x4007903")]
public const int SKEIN_1024 = 1024;
// Token: 0x04007904 RID: 30980
[Token(Token = "0x4007904")]
private const int PARAM_TYPE_KEY = 0;
// Token: 0x04007905 RID: 30981
[Token(Token = "0x4007905")]
private const int PARAM_TYPE_CONFIG = 4;
// Token: 0x04007906 RID: 30982
[Token(Token = "0x4007906")]
private const int PARAM_TYPE_MESSAGE = 48;
// Token: 0x04007907 RID: 30983
[Token(Token = "0x4007907")]
private const int PARAM_TYPE_OUTPUT = 63;
// Token: 0x04007908 RID: 30984
[Token(Token = "0x4007908")]
private static readonly IDictionary INITIAL_STATES = Platform.CreateHashtable();
// Token: 0x04007909 RID: 30985
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4007909")]
private readonly ThreefishEngine threefish;
// Token: 0x0400790A RID: 30986
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400790A")]
private readonly int outputSizeBytes;
// Token: 0x0400790B RID: 30987
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400790B")]
private ulong[] chain;
// Token: 0x0400790C RID: 30988
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x400790C")]
private ulong[] initialState;
// Token: 0x0400790D RID: 30989
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x400790D")]
private byte[] key;
// Token: 0x0400790E RID: 30990
[FieldOffset(Offset = "0x38")]
[Token(Token = "0x400790E")]
private SkeinEngine.Parameter[] preMessageParameters;
// Token: 0x0400790F RID: 30991
[FieldOffset(Offset = "0x40")]
[Token(Token = "0x400790F")]
private SkeinEngine.Parameter[] postMessageParameters;
// Token: 0x04007910 RID: 30992
[FieldOffset(Offset = "0x48")]
[Token(Token = "0x4007910")]
private readonly SkeinEngine.UBI ubi;
// Token: 0x04007911 RID: 30993
[FieldOffset(Offset = "0x50")]
[Token(Token = "0x4007911")]
private readonly byte[] singleByte;
// Token: 0x02001DDF RID: 7647
[Token(Token = "0x2001DDF")]
private class Configuration
{
// Token: 0x0600BFBC RID: 49084 RVA: 0x002B2C24 File Offset: 0x002B0E24
[Token(Token = "0x600BFBC")]
[Address(RVA = "0x28FDFA0", Offset = "0x28FCFA0", VA = "0x1828FDFA0")]
public Configuration(long outputSizeBits)
{
byte[] array = new byte[32];
this.bytes = array;
base..ctor();
byte[] array2 = this.bytes;
byte[] array3 = this.bytes;
byte[] array4 = this.bytes;
byte[] array5 = this.bytes;
byte[] array6 = this.bytes;
byte[] array7 = this.bytes;
byte[] array8 = this.bytes;
ThreefishEngine.WordToBytes((ulong)outputSizeBits, array8, 8);
}
// Token: 0x17001DC5 RID: 7621
// (get) Token: 0x0600BFBD RID: 49085 RVA: 0x002B2C8C File Offset: 0x002B0E8C
[Token(Token = "0x17001DC5")]
public byte[] Bytes
{
[Token(Token = "0x600BFBD")]
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
get
{
return this.bytes;
}
}
// Token: 0x04007912 RID: 30994
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4007912")]
private byte[] bytes;
}
// Token: 0x02001DE0 RID: 7648
[Token(Token = "0x2001DE0")]
public class Parameter
{
// Token: 0x0600BFBE RID: 49086 RVA: 0x002B2CA0 File Offset: 0x002B0EA0
[Token(Token = "0x600BFBE")]
[Address(RVA = "0x49A4C0", Offset = "0x4994C0", VA = "0x18049A4C0")]
public Parameter(int type, byte[] value)
{
this.type = type;
this.value = value;
}
// Token: 0x17001DC6 RID: 7622
// (get) Token: 0x0600BFBF RID: 49087 RVA: 0x002B2CC4 File Offset: 0x002B0EC4
[Token(Token = "0x17001DC6")]
public int Type
{
[Token(Token = "0x600BFBF")]
[Address(RVA = "0x40F000", Offset = "0x40E000", VA = "0x18040F000")]
get
{
return this.type;
}
}
// Token: 0x17001DC7 RID: 7623
// (get) Token: 0x0600BFC0 RID: 49088 RVA: 0x002B2CD8 File Offset: 0x002B0ED8
[Token(Token = "0x17001DC7")]
public byte[] Value
{
[Token(Token = "0x600BFC0")]
[Address(RVA = "0x4157B0", Offset = "0x4147B0", VA = "0x1804157B0")]
get
{
return this.value;
}
}
// Token: 0x04007913 RID: 30995
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4007913")]
private int type;
// Token: 0x04007914 RID: 30996
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4007914")]
private byte[] value;
}
// Token: 0x02001DE1 RID: 7649
[Token(Token = "0x2001DE1")]
private class UbiTweak
{
// Token: 0x0600BFC1 RID: 49089 RVA: 0x002B2CEC File Offset: 0x002B0EEC
[Token(Token = "0x600BFC1")]
[Address(RVA = "0x29136E0", Offset = "0x29126E0", VA = "0x1829136E0")]
public UbiTweak()
{
ulong[] array = new ulong[2];
this.tweak = array;
base..ctor();
this.Reset();
}
// Token: 0x0600BFC2 RID: 49090 RVA: 0x002B2D14 File Offset: 0x002B0F14
[Token(Token = "0x600BFC2")]
[Address(RVA = "0x2913360", Offset = "0x2912360", VA = "0x182913360")]
public void Reset(SkeinEngine.UbiTweak tweak)
{
ulong[] array = this.tweak;
ulong[] array2 = Arrays.Clone(tweak.tweak, array);
this.tweak = array2;
bool flag = tweak.extendedPosition;
this.extendedPosition = flag;
}
// Token: 0x0600BFC3 RID: 49091 RVA: 0x002B2D50 File Offset: 0x002B0F50
[Token(Token = "0x600BFC3")]
[Address(RVA = "0x29132D0", Offset = "0x29122D0", VA = "0x1829132D0")]
public void Reset()
{
ulong[] array = this.tweak;
int num = 0;
array[0] = (ulong)num;
this.tweak[1] = (ulong)num;
ulong[] array2 = this.tweak;
this.extendedPosition = num != 0;
}
// Token: 0x17001DC8 RID: 7624
// (get) Token: 0x0600BFC4 RID: 49092 RVA: 0x002B2D90 File Offset: 0x002B0F90
// (set) Token: 0x0600BFC5 RID: 49093 RVA: 0x002B2DB0 File Offset: 0x002B0FB0
[Token(Token = "0x17001DC8")]
public uint Type
{
[Token(Token = "0x600BFC4")]
[Address(RVA = "0x29137C0", Offset = "0x29127C0", VA = "0x1829137C0")]
get
{
ulong num = this.tweak[1];
throw new NullReferenceException();
}
[Token(Token = "0x600BFC5")]
[Address(RVA = "0x29138E0", Offset = "0x29128E0", VA = "0x1829138E0")]
set
{
this.tweak[1] = (ulong)value;
}
}
// Token: 0x17001DC9 RID: 7625
// (get) Token: 0x0600BFC6 RID: 49094 RVA: 0x002B2DD0 File Offset: 0x002B0FD0
// (set) Token: 0x0600BFC7 RID: 49095 RVA: 0x002B2DEC File Offset: 0x002B0FEC
[Token(Token = "0x17001DC9")]
public bool First
{
[Token(Token = "0x600BFC6")]
[Address(RVA = "0x2913780", Offset = "0x2912780", VA = "0x182913780")]
get
{
ulong[] array = this.tweak;
throw new NullReferenceException();
}
[Token(Token = "0x600BFC7")]
[Address(RVA = "0x2913870", Offset = "0x2912870", VA = "0x182913870")]
set
{
ulong[] array = this.tweak;
if (!value)
{
return;
}
}
}
// Token: 0x17001DCA RID: 7626
// (get) Token: 0x0600BFC8 RID: 49096 RVA: 0x002B2E0C File Offset: 0x002B100C
// (set) Token: 0x0600BFC9 RID: 49097 RVA: 0x002B2E28 File Offset: 0x002B1028
[Token(Token = "0x17001DCA")]
public bool Final
{
[Token(Token = "0x600BFC8")]
[Address(RVA = "0x2913740", Offset = "0x2912740", VA = "0x182913740")]
get
{
ulong[] array = this.tweak;
throw new IndexOutOfRangeException();
}
[Token(Token = "0x600BFC9")]
[Address(RVA = "0x2913800", Offset = "0x2912800", VA = "0x182913800")]
set
{
ulong[] array = this.tweak;
if (!value)
{
return;
}
}
}
// Token: 0x0600BFCA RID: 49098 RVA: 0x002B2E48 File Offset: 0x002B1048
[Token(Token = "0x600BFCA")]
[Address(RVA = "0x2913030", Offset = "0x2912030", VA = "0x182913030")]
public void AdvancePosition(int advance)
{
if (!this.extendedPosition)
{
this.tweak[0] = (ulong)advance;
ulong num;
if ((ulong)advance > num)
{
this.extendedPosition = true;
}
return;
}
ulong[] array = new ulong[3];
ulong num2 = this.tweak[0];
array[0] = num2;
ulong num3 = this.tweak[0];
array[1] = num3;
ulong num4 = this.tweak[1];
array[2] = num4;
int num5 = 0;
int length = array.Length;
if (num5 < length)
{
num5++;
}
ulong[] array2 = this.tweak;
ulong num6 = array[1];
array2[0] = num6;
ulong[] array3 = this.tweak;
ulong num7 = array[2];
array3[1] = num7;
}
// Token: 0x0600BFCB RID: 49099 RVA: 0x002B2F14 File Offset: 0x002B1114
[Token(Token = "0x600BFCB")]
[Address(RVA = "0x411530", Offset = "0x410530", VA = "0x180411530")]
public ulong[] GetWords()
{
return this.tweak;
}
// Token: 0x0600BFCC RID: 49100 RVA: 0x002B2F28 File Offset: 0x002B1128
[Token(Token = "0x600BFCC")]
[Address(RVA = "0x2913400", Offset = "0x2912400", VA = "0x182913400", Slot = "3")]
public override string ToString()
{
object[] array = new object[5];
ulong num = this.tweak[1];
if (num != (ulong)0L)
{
}
array[0] = num;
if (" first: " != 0)
{
}
array[1] = " first: ";
ulong[] array2 = this.tweak;
string text;
if (text != 0)
{
}
array[2] = text;
if (", final: " != 0)
{
}
array[3] = ", final: ";
ulong[] array3 = this.tweak;
string text2;
if (text2 != 0)
{
}
array[4] = text2;
return string.Concat(array);
}
// Token: 0x04007915 RID: 30997
[Token(Token = "0x4007915")]
private const ulong LOW_RANGE = 18446744069414584320UL;
// Token: 0x04007916 RID: 30998
[Token(Token = "0x4007916")]
private const ulong T1_FINAL = 9223372036854775808UL;
// Token: 0x04007917 RID: 30999
[Token(Token = "0x4007917")]
private const ulong T1_FIRST = 4611686018427387904UL;
// Token: 0x04007918 RID: 31000
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x4007918")]
private ulong[] tweak;
// Token: 0x04007919 RID: 31001
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x4007919")]
private bool extendedPosition;
}
// Token: 0x02001DE2 RID: 7650
[Token(Token = "0x2001DE2")]
private class UBI
{
// Token: 0x0600BFCD RID: 49101 RVA: 0x002B2FB8 File Offset: 0x002B11B8
[Token(Token = "0x600BFCD")]
[Address(RVA = "0x2912F40", Offset = "0x2911F40", VA = "0x182912F40")]
public UBI(SkeinEngine engine, int blockSize)
{
SkeinEngine.UbiTweak ubiTweak = new SkeinEngine.UbiTweak();
ulong[] array = new ulong[2];
ubiTweak.tweak = array;
ubiTweak.Reset();
this.tweak = ubiTweak;
base..ctor();
this.engine = engine;
byte[] array2 = new byte[blockSize];
this.currentBlock = array2;
int length = array2.Length;
ulong[] array3 = new ulong[blockSize];
this.message = array3;
}
// Token: 0x0600BFCE RID: 49102 RVA: 0x002B3020 File Offset: 0x002B1220
[Token(Token = "0x600BFCE")]
[Address(RVA = "0x2912C10", Offset = "0x2911C10", VA = "0x182912C10")]
public void Reset(SkeinEngine.UBI ubi)
{
byte[] array = ubi.currentBlock;
byte[] array2 = this.currentBlock;
byte[] array3 = Arrays.Clone(array, array2);
ulong[] array4 = this.message;
this.currentBlock = array3;
int num = ubi.currentOffset;
this.currentOffset = num;
ulong[] array5 = Arrays.Clone(ubi.message, array4);
this.message = array5;
SkeinEngine.UbiTweak ubiTweak = this.tweak;
SkeinEngine.UbiTweak ubiTweak2 = ubi.tweak;
ulong[] array6 = ubiTweak2.tweak;
ulong[] array7 = ubiTweak.tweak;
ulong[] array8 = Arrays.Clone(array6, array7);
ubiTweak.tweak = array8;
bool extendedPosition = ubiTweak2.extendedPosition;
ubiTweak.extendedPosition = extendedPosition;
}
// Token: 0x0600BFCF RID: 49103 RVA: 0x002B30C8 File Offset: 0x002B12C8
[Token(Token = "0x600BFCF")]
[Address(RVA = "0x2912D30", Offset = "0x2911D30", VA = "0x182912D30")]
public void Reset(int type)
{
this.tweak.Reset();
this.tweak.tweak[1] = (ulong)type;
this.currentOffset = (int)((ulong)0L);
}
// Token: 0x0600BFD0 RID: 49104 RVA: 0x002B3104 File Offset: 0x002B1304
[Token(Token = "0x600BFD0")]
[Address(RVA = "0x2912DC0", Offset = "0x2911DC0", VA = "0x182912DC0")]
public void Update(byte[] value, int offset, int len, ulong[] output)
{
int num = 0;
if (len > 0)
{
byte[] array = this.currentBlock;
int num2 = this.currentOffset;
if (num2 == array.Length)
{
ulong[] array2 = this.tweak.tweak;
this.currentOffset = (int)((ulong)0L);
}
int num3 = array.Length;
num3 -= num2;
int num4 = Math.Min(len, num3);
int num5 = this.currentOffset;
byte[] array3 = this.currentBlock;
Array.Copy(value, 0, array3, num5, num4);
SkeinEngine.UbiTweak ubiTweak = this.tweak;
num += num4;
ubiTweak.AdvancePosition(num4);
}
}
// Token: 0x0600BFD1 RID: 49105 RVA: 0x002B3194 File Offset: 0x002B1394
[Token(Token = "0x600BFD1")]
[Address(RVA = "0x2912A70", Offset = "0x2911A70", VA = "0x182912A70")]
private void ProcessBlock(ulong[] output)
{
SkeinEngine skeinEngine = this.engine;
SkeinEngine.UbiTweak ubiTweak = this.tweak;
ThreefishEngine threefish = skeinEngine.threefish;
ulong[] array = ubiTweak.tweak;
int num = 0;
ulong[] chain = skeinEngine.chain;
threefish.Init(16777216 != 0, chain, array);
ulong[] array2 = this.message;
ulong[] array3;
if (num < array2.Length)
{
ulong num2 = ThreefishEngine.BytesToWord(this.currentBlock, 16777216);
num++;
array2[0] = num2;
array3 = this.message;
}
int num3 = this.engine.threefish.ProcessBlock(array3, output);
int length = output.Length;
if (num < length)
{
ulong num4 = this.message[num];
num++;
}
}
// Token: 0x0600BFD2 RID: 49106 RVA: 0x002B3254 File Offset: 0x002B1454
[Token(Token = "0x600BFD2")]
[Address(RVA = "0x29129D0", Offset = "0x29119D0", VA = "0x1829129D0")]
public void DoFinal(ulong[] output)
{
byte[] array = this.currentBlock;
int num = this.currentOffset;
if (num < array.Length)
{
num++;
byte[] array2 = this.currentBlock;
}
ulong[] array3 = this.tweak.tweak;
this.ProcessBlock(output);
}
// Token: 0x0400791A RID: 31002
[FieldOffset(Offset = "0x10")]
[Token(Token = "0x400791A")]
private readonly SkeinEngine.UbiTweak tweak;
// Token: 0x0400791B RID: 31003
[FieldOffset(Offset = "0x18")]
[Token(Token = "0x400791B")]
private readonly SkeinEngine engine;
// Token: 0x0400791C RID: 31004
[FieldOffset(Offset = "0x20")]
[Token(Token = "0x400791C")]
private byte[] currentBlock;
// Token: 0x0400791D RID: 31005
[FieldOffset(Offset = "0x28")]
[Token(Token = "0x400791D")]
private int currentOffset;
// Token: 0x0400791E RID: 31006
[FieldOffset(Offset = "0x30")]
[Token(Token = "0x400791E")]
private ulong[] message;
}
}
}