1070 lines
44 KiB
C#
1070 lines
44 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
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: 0x02001721 RID: 5921
|
|
[Token(Token = "0x2001721")]
|
|
[StructLayout(3)]
|
|
public class SkeinEngine : IMemoable
|
|
{
|
|
// Token: 0x06009FFD RID: 40957 RVA: 0x00251598 File Offset: 0x0024F798
|
|
[Token(Token = "0x6009FFD")]
|
|
[Address(RVA = "0x2253200", Offset = "0x2251C00", VA = "0x182253200")]
|
|
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: 0x06009FFE RID: 40958 RVA: 0x002516CC File Offset: 0x0024F8CC
|
|
[Token(Token = "0x6009FFE")]
|
|
[Address(RVA = "0x2252B00", Offset = "0x2251500", VA = "0x182252B00")]
|
|
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: 0x06009FFF RID: 40959 RVA: 0x002516F4 File Offset: 0x0024F8F4
|
|
[Token(Token = "0x6009FFF")]
|
|
[Address(RVA = "0x22531F0", Offset = "0x2251BF0", VA = "0x1822531F0")]
|
|
private static int VariantIdentifier(int blockSizeBytes, int outputSizeBytes)
|
|
{
|
|
return outputSizeBytes;
|
|
}
|
|
|
|
// Token: 0x0600A000 RID: 40960 RVA: 0x00251704 File Offset: 0x0024F904
|
|
[Token(Token = "0x600A000")]
|
|
[Address(RVA = "0x2253470", Offset = "0x2251E70", VA = "0x182253470")]
|
|
public SkeinEngine(int blockSizeBits, int outputSizeBits)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A000)
|
|
|
|
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_4A:
|
|
stloc:ArgumentException(var_6_5A, 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: 0x0600A001 RID: 40961 RVA: 0x0025176C File Offset: 0x0024F96C
|
|
[Token(Token = "0x600A001")]
|
|
[Address(RVA = "0x22535B0", Offset = "0x2251FB0", VA = "0x1822535B0")]
|
|
public SkeinEngine(SkeinEngine engine)
|
|
{
|
|
bool isPartialBlockOkay = engine.threefish.IsPartialBlockOkay;
|
|
this.CopyIn(engine);
|
|
}
|
|
|
|
// Token: 0x0600A002 RID: 40962 RVA: 0x00251794 File Offset: 0x0024F994
|
|
[Token(Token = "0x600A002")]
|
|
[Address(RVA = "0x2251E60", Offset = "0x2250860", VA = "0x182251E60")]
|
|
private void CopyIn(SkeinEngine engine)
|
|
{
|
|
SkeinEngine.UBI ubi = this.ubi;
|
|
SkeinEngine.UBI ubi2 = engine.ubi;
|
|
ubi.Reset(ubi2);
|
|
ulong[] array = engine.chain;
|
|
ulong[] array2 = this.chain;
|
|
ulong[] array3 = Arrays.Clone(array, array2);
|
|
ulong[] array4 = this.initialState;
|
|
this.chain = array3;
|
|
ulong[] array5 = Arrays.Clone(engine.initialState, array4);
|
|
byte[] array6 = this.key;
|
|
this.initialState = array5;
|
|
byte[] array7 = Arrays.Clone(engine.key, array6);
|
|
SkeinEngine.Parameter[] array8 = this.preMessageParameters;
|
|
this.key = array7;
|
|
SkeinEngine.Parameter[] array9 = SkeinEngine.Clone(engine.preMessageParameters, array8);
|
|
SkeinEngine.Parameter[] array10 = this.postMessageParameters;
|
|
this.preMessageParameters = array9;
|
|
SkeinEngine.Parameter[] array11 = SkeinEngine.Clone(engine.postMessageParameters, array10);
|
|
this.postMessageParameters = array11;
|
|
}
|
|
|
|
// Token: 0x0600A003 RID: 40963 RVA: 0x00251858 File Offset: 0x0024FA58
|
|
[Token(Token = "0x600A003")]
|
|
[Address(RVA = "0x2251DC0", Offset = "0x22507C0", VA = "0x182251DC0")]
|
|
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: 0x0600A004 RID: 40964 RVA: 0x002518AC File Offset: 0x0024FAAC
|
|
[Token(Token = "0x600A004")]
|
|
[Address(RVA = "0x2251F80", Offset = "0x2250980", VA = "0x182251F80", Slot = "4")]
|
|
public IMemoable Copy()
|
|
{
|
|
bool isPartialBlockOkay = this.threefish.IsPartialBlockOkay;
|
|
SkeinEngine skeinEngine;
|
|
skeinEngine.CopyIn(this);
|
|
throw new NullReferenceException();
|
|
}
|
|
|
|
// Token: 0x0600A005 RID: 40965 RVA: 0x002518D4 File Offset: 0x0024FAD4
|
|
[Token(Token = "0x600A005")]
|
|
[Address(RVA = "0x2252F00", Offset = "0x2251900", VA = "0x182252F00", Slot = "5")]
|
|
public void Reset(IMemoable other)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A005)
|
|
|
|
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: 0x17001925 RID: 6437
|
|
// (get) Token: 0x0600A006 RID: 40966 RVA: 0x0025191C File Offset: 0x0024FB1C
|
|
[Token(Token = "0x17001925")]
|
|
public int OutputSize
|
|
{
|
|
[Token(Token = "0x600A006")]
|
|
[Address(RVA = "0x3EE8D0", Offset = "0x3ED2D0", VA = "0x1803EE8D0")]
|
|
get
|
|
{
|
|
return this.outputSizeBytes;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001926 RID: 6438
|
|
// (get) Token: 0x0600A007 RID: 40967 RVA: 0x00251930 File Offset: 0x0024FB30
|
|
[Token(Token = "0x17001926")]
|
|
public int BlockSize
|
|
{
|
|
[Token(Token = "0x600A007")]
|
|
[Address(RVA = "0x2253620", Offset = "0x2252020", VA = "0x182253620")]
|
|
get
|
|
{
|
|
string algorithmName = ((IBlockCipher)this.threefish).AlgorithmName;
|
|
throw new NullReferenceException();
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600A008 RID: 40968 RVA: 0x00251950 File Offset: 0x0024FB50
|
|
[Token(Token = "0x600A008")]
|
|
[Address(RVA = "0x2252A30", Offset = "0x2251430", VA = "0x182252A30")]
|
|
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.ubi.Reset(48);
|
|
}
|
|
|
|
// Token: 0x0600A009 RID: 40969 RVA: 0x002519B0 File Offset: 0x0024FBB0
|
|
[Token(Token = "0x600A009")]
|
|
[Address(RVA = "0x2252630", Offset = "0x2251030", VA = "0x182252630")]
|
|
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_7A;
|
|
}
|
|
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)
|
|
{
|
|
}
|
|
IL_7A:
|
|
SkeinEngine.Parameter[] array = new SkeinEngine.Parameter[0];
|
|
SkeinEngine.Parameter[] array2 = new SkeinEngine.Parameter[array];
|
|
}
|
|
|
|
// Token: 0x0600A00A RID: 40970 RVA: 0x00251A54 File Offset: 0x0024FC54
|
|
[Token(Token = "0x600A00A")]
|
|
[Address(RVA = "0x2252020", Offset = "0x2250A20", VA = "0x182252020")]
|
|
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;
|
|
if (array3 != 0)
|
|
{
|
|
int num3 = 0;
|
|
this.UbiComplete(num3, array3);
|
|
}
|
|
SkeinEngine.UBI ubi = this.ubi;
|
|
SkeinEngine.Configuration configuration;
|
|
byte[] bytes = configuration.bytes;
|
|
ubi.Reset(4);
|
|
SkeinEngine.UBI ubi2 = this.ubi;
|
|
ulong[] array4 = this.chain;
|
|
int num4 = 0;
|
|
int length = bytes.Length;
|
|
ubi2.Update(bytes, num4, length, array4);
|
|
SkeinEngine.UBI ubi3 = this.ubi;
|
|
ulong[] array5 = this.chain;
|
|
ubi3.DoFinal(array5);
|
|
SkeinEngine.Parameter[] array6 = this.preMessageParameters;
|
|
if (array6 != 0 && num2 < array6.Length)
|
|
{
|
|
SkeinEngine.Parameter parameter = array6[num2];
|
|
SkeinEngine.UBI ubi4 = this.ubi;
|
|
byte[] value = parameter.value;
|
|
int type = parameter.type;
|
|
ubi4.Reset(type);
|
|
SkeinEngine.UBI ubi5 = this.ubi;
|
|
ulong[] array7 = this.chain;
|
|
int num5 = 0;
|
|
int length2 = value.Length;
|
|
ubi5.Update(value, num5, length2, array7);
|
|
SkeinEngine.UBI ubi6 = this.ubi;
|
|
ulong[] array8 = this.chain;
|
|
ubi6.DoFinal(array8);
|
|
SkeinEngine.Parameter[] array9 = this.preMessageParameters;
|
|
num2++;
|
|
}
|
|
ulong[] array10 = Arrays.Clone(this.chain);
|
|
this.initialState = array10;
|
|
}
|
|
|
|
// Token: 0x0600A00B RID: 40971 RVA: 0x00251BEC File Offset: 0x0024FDEC
|
|
[Token(Token = "0x600A00B")]
|
|
[Address(RVA = "0x2252EA0", Offset = "0x22518A0", VA = "0x182252EA0")]
|
|
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.ubi.Reset(48);
|
|
}
|
|
|
|
// Token: 0x0600A00C RID: 40972 RVA: 0x00251C34 File Offset: 0x0024FE34
|
|
[Token(Token = "0x600A00C")]
|
|
[Address(RVA = "0x2253020", Offset = "0x2251A20", VA = "0x182253020")]
|
|
private void UbiComplete(int type, byte[] value)
|
|
{
|
|
this.ubi.Reset(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: 0x0600A00D RID: 40973 RVA: 0x00251C90 File Offset: 0x0024FE90
|
|
[Token(Token = "0x600A00D")]
|
|
[Address(RVA = "0x22530D0", Offset = "0x2251AD0", VA = "0x1822530D0")]
|
|
private void UbiInit(int type)
|
|
{
|
|
this.ubi.Reset(type);
|
|
}
|
|
|
|
// Token: 0x0600A00E RID: 40974 RVA: 0x00251CB0 File Offset: 0x0024FEB0
|
|
[Token(Token = "0x600A00E")]
|
|
[Address(RVA = "0x22530A0", Offset = "0x2251AA0", VA = "0x1822530A0")]
|
|
private void UbiFinal()
|
|
{
|
|
SkeinEngine.UBI ubi = this.ubi;
|
|
ulong[] array = this.chain;
|
|
ubi.DoFinal(array);
|
|
}
|
|
|
|
// Token: 0x0600A00F RID: 40975 RVA: 0x00251CD8 File Offset: 0x0024FED8
|
|
[Token(Token = "0x600A00F")]
|
|
[Address(RVA = "0x2251D50", Offset = "0x2250750", VA = "0x182251D50")]
|
|
private void CheckInitialised()
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A00F)
|
|
|
|
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: 0x0600A010 RID: 40976 RVA: 0x00251CFC File Offset: 0x0024FEFC
|
|
[Token(Token = "0x600A010")]
|
|
[Address(RVA = "0x22531A0", Offset = "0x2251BA0", VA = "0x1822531A0")]
|
|
public void Update(byte inByte)
|
|
{
|
|
this.singleByte[0] = inByte;
|
|
byte[] array = this.singleByte;
|
|
int num = 0;
|
|
this.Update(array, num, 1);
|
|
}
|
|
|
|
// Token: 0x0600A011 RID: 40977 RVA: 0x00251D30 File Offset: 0x0024FF30
|
|
[Token(Token = "0x600A011")]
|
|
[Address(RVA = "0x22530F0", Offset = "0x2251AF0", VA = "0x1822530F0")]
|
|
public void Update(byte[] inBytes, int inOff, int len)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A011)
|
|
|
|
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: 0x0600A012 RID: 40978 RVA: 0x00251D64 File Offset: 0x0024FF64
|
|
[Token(Token = "0x600A012")]
|
|
[Address(RVA = "0x2252360", Offset = "0x2250D60", VA = "0x182252360")]
|
|
public int DoFinal(byte[] outBytes, int outOff)
|
|
{
|
|
/*
|
|
An exception occurred when decompiling this method (0600A012)
|
|
|
|
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_157:
|
|
stloc:ArgumentException(var_26_161, 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: 0x0600A013 RID: 40979 RVA: 0x00251ED4 File Offset: 0x002500D4
|
|
[Token(Token = "0x600A013")]
|
|
[Address(RVA = "0x2252C40", Offset = "0x2251640", VA = "0x182252C40")]
|
|
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.ubi.Reset(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: 0x04006905 RID: 26885
|
|
[Token(Token = "0x4006905")]
|
|
public const int SKEIN_256 = 256;
|
|
|
|
// Token: 0x04006906 RID: 26886
|
|
[Token(Token = "0x4006906")]
|
|
public const int SKEIN_512 = 512;
|
|
|
|
// Token: 0x04006907 RID: 26887
|
|
[Token(Token = "0x4006907")]
|
|
public const int SKEIN_1024 = 1024;
|
|
|
|
// Token: 0x04006908 RID: 26888
|
|
[Token(Token = "0x4006908")]
|
|
private const int PARAM_TYPE_KEY = 0;
|
|
|
|
// Token: 0x04006909 RID: 26889
|
|
[Token(Token = "0x4006909")]
|
|
private const int PARAM_TYPE_CONFIG = 4;
|
|
|
|
// Token: 0x0400690A RID: 26890
|
|
[Token(Token = "0x400690A")]
|
|
private const int PARAM_TYPE_MESSAGE = 48;
|
|
|
|
// Token: 0x0400690B RID: 26891
|
|
[Token(Token = "0x400690B")]
|
|
private const int PARAM_TYPE_OUTPUT = 63;
|
|
|
|
// Token: 0x0400690C RID: 26892
|
|
[Token(Token = "0x400690C")]
|
|
private static readonly IDictionary INITIAL_STATES = Platform.CreateHashtable();
|
|
|
|
// Token: 0x0400690D RID: 26893
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400690D")]
|
|
private readonly ThreefishEngine threefish;
|
|
|
|
// Token: 0x0400690E RID: 26894
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400690E")]
|
|
private readonly int outputSizeBytes;
|
|
|
|
// Token: 0x0400690F RID: 26895
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x400690F")]
|
|
private ulong[] chain;
|
|
|
|
// Token: 0x04006910 RID: 26896
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4006910")]
|
|
private ulong[] initialState;
|
|
|
|
// Token: 0x04006911 RID: 26897
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4006911")]
|
|
private byte[] key;
|
|
|
|
// Token: 0x04006912 RID: 26898
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x38")]
|
|
[Token(Token = "0x4006912")]
|
|
private SkeinEngine.Parameter[] preMessageParameters;
|
|
|
|
// Token: 0x04006913 RID: 26899
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x40")]
|
|
[Token(Token = "0x4006913")]
|
|
private SkeinEngine.Parameter[] postMessageParameters;
|
|
|
|
// Token: 0x04006914 RID: 26900
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x48")]
|
|
[Token(Token = "0x4006914")]
|
|
private readonly SkeinEngine.UBI ubi;
|
|
|
|
// Token: 0x04006915 RID: 26901
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x50")]
|
|
[Token(Token = "0x4006915")]
|
|
private readonly byte[] singleByte;
|
|
|
|
// Token: 0x02001722 RID: 5922
|
|
[Token(Token = "0x2001722")]
|
|
private class Configuration
|
|
{
|
|
// Token: 0x0600A014 RID: 40980 RVA: 0x00251F80 File Offset: 0x00250180
|
|
[Token(Token = "0x600A014")]
|
|
[Address(RVA = "0x2059640", Offset = "0x2058040", VA = "0x182059640")]
|
|
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: 0x17001927 RID: 6439
|
|
// (get) Token: 0x0600A015 RID: 40981 RVA: 0x00251FE8 File Offset: 0x002501E8
|
|
[Token(Token = "0x17001927")]
|
|
public byte[] Bytes
|
|
{
|
|
[Token(Token = "0x600A015")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
|
get
|
|
{
|
|
return this.bytes;
|
|
}
|
|
}
|
|
|
|
// Token: 0x04006916 RID: 26902
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006916")]
|
|
private byte[] bytes;
|
|
}
|
|
|
|
// Token: 0x02001723 RID: 5923
|
|
[Token(Token = "0x2001723")]
|
|
public class Parameter
|
|
{
|
|
// Token: 0x0600A016 RID: 40982 RVA: 0x00251FFC File Offset: 0x002501FC
|
|
[Token(Token = "0x600A016")]
|
|
[Address(RVA = "0x3C1040", Offset = "0x3BFA40", VA = "0x1803C1040")]
|
|
public Parameter(int type, byte[] value)
|
|
{
|
|
this.type = type;
|
|
this.value = value;
|
|
}
|
|
|
|
// Token: 0x17001928 RID: 6440
|
|
// (get) Token: 0x0600A017 RID: 40983 RVA: 0x00252020 File Offset: 0x00250220
|
|
[Token(Token = "0x17001928")]
|
|
public int Type
|
|
{
|
|
[Token(Token = "0x600A017")]
|
|
[Address(RVA = "0x3C1C50", Offset = "0x3C0650", VA = "0x1803C1C50")]
|
|
get
|
|
{
|
|
return this.type;
|
|
}
|
|
}
|
|
|
|
// Token: 0x17001929 RID: 6441
|
|
// (get) Token: 0x0600A018 RID: 40984 RVA: 0x00252034 File Offset: 0x00250234
|
|
[Token(Token = "0x17001929")]
|
|
public byte[] Value
|
|
{
|
|
[Token(Token = "0x600A018")]
|
|
[Address(RVA = "0x3C1240", Offset = "0x3BFC40", VA = "0x1803C1240")]
|
|
get
|
|
{
|
|
return this.value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x04006917 RID: 26903
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x4006917")]
|
|
private int type;
|
|
|
|
// Token: 0x04006918 RID: 26904
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x4006918")]
|
|
private byte[] value;
|
|
}
|
|
|
|
// Token: 0x02001724 RID: 5924
|
|
[Token(Token = "0x2001724")]
|
|
private class UbiTweak
|
|
{
|
|
// Token: 0x0600A019 RID: 40985 RVA: 0x00252048 File Offset: 0x00250248
|
|
[Token(Token = "0x600A019")]
|
|
[Address(RVA = "0x2065300", Offset = "0x2063D00", VA = "0x182065300")]
|
|
public UbiTweak()
|
|
{
|
|
ulong[] array = new ulong[2];
|
|
this.tweak = array;
|
|
base..ctor();
|
|
this.Reset();
|
|
}
|
|
|
|
// Token: 0x0600A01A RID: 40986 RVA: 0x00252070 File Offset: 0x00250270
|
|
[Token(Token = "0x600A01A")]
|
|
[Address(RVA = "0x2064F80", Offset = "0x2063980", VA = "0x182064F80")]
|
|
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: 0x0600A01B RID: 40987 RVA: 0x002520AC File Offset: 0x002502AC
|
|
[Token(Token = "0x600A01B")]
|
|
[Address(RVA = "0x2064EF0", Offset = "0x20638F0", VA = "0x182064EF0")]
|
|
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: 0x1700192A RID: 6442
|
|
// (get) Token: 0x0600A01C RID: 40988 RVA: 0x002520EC File Offset: 0x002502EC
|
|
// (set) Token: 0x0600A01D RID: 40989 RVA: 0x0025210C File Offset: 0x0025030C
|
|
[Token(Token = "0x1700192A")]
|
|
public uint Type
|
|
{
|
|
[Token(Token = "0x600A01C")]
|
|
[Address(RVA = "0x20653E0", Offset = "0x2063DE0", VA = "0x1820653E0")]
|
|
get
|
|
{
|
|
ulong num = this.tweak[1];
|
|
throw new NullReferenceException();
|
|
}
|
|
[Token(Token = "0x600A01D")]
|
|
[Address(RVA = "0x2065500", Offset = "0x2063F00", VA = "0x182065500")]
|
|
set
|
|
{
|
|
this.tweak[1] = (ulong)value;
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700192B RID: 6443
|
|
// (get) Token: 0x0600A01E RID: 40990 RVA: 0x0025212C File Offset: 0x0025032C
|
|
// (set) Token: 0x0600A01F RID: 40991 RVA: 0x00252148 File Offset: 0x00250348
|
|
[Token(Token = "0x1700192B")]
|
|
public bool First
|
|
{
|
|
[Token(Token = "0x600A01E")]
|
|
[Address(RVA = "0x20653A0", Offset = "0x2063DA0", VA = "0x1820653A0")]
|
|
get
|
|
{
|
|
ulong[] array = this.tweak;
|
|
throw new NullReferenceException();
|
|
}
|
|
[Token(Token = "0x600A01F")]
|
|
[Address(RVA = "0x2065490", Offset = "0x2063E90", VA = "0x182065490")]
|
|
set
|
|
{
|
|
ulong[] array = this.tweak;
|
|
if (!value)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x1700192C RID: 6444
|
|
// (get) Token: 0x0600A020 RID: 40992 RVA: 0x00252168 File Offset: 0x00250368
|
|
// (set) Token: 0x0600A021 RID: 40993 RVA: 0x00252184 File Offset: 0x00250384
|
|
[Token(Token = "0x1700192C")]
|
|
public bool Final
|
|
{
|
|
[Token(Token = "0x600A020")]
|
|
[Address(RVA = "0x2065360", Offset = "0x2063D60", VA = "0x182065360")]
|
|
get
|
|
{
|
|
ulong[] array = this.tweak;
|
|
throw new IndexOutOfRangeException();
|
|
}
|
|
[Token(Token = "0x600A021")]
|
|
[Address(RVA = "0x2065420", Offset = "0x2063E20", VA = "0x182065420")]
|
|
set
|
|
{
|
|
ulong[] array = this.tweak;
|
|
if (!value)
|
|
{
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Token: 0x0600A022 RID: 40994 RVA: 0x002521A4 File Offset: 0x002503A4
|
|
[Token(Token = "0x600A022")]
|
|
[Address(RVA = "0x2064C50", Offset = "0x2063650", VA = "0x182064C50")]
|
|
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: 0x0600A023 RID: 40995 RVA: 0x00252270 File Offset: 0x00250470
|
|
[Token(Token = "0x600A023")]
|
|
[Address(RVA = "0x3C39A0", Offset = "0x3C23A0", VA = "0x1803C39A0")]
|
|
public ulong[] GetWords()
|
|
{
|
|
return this.tweak;
|
|
}
|
|
|
|
// Token: 0x0600A024 RID: 40996 RVA: 0x00252284 File Offset: 0x00250484
|
|
[Token(Token = "0x600A024")]
|
|
[Address(RVA = "0x2065020", Offset = "0x2063A20", VA = "0x182065020", 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;
|
|
if (array2 != 0)
|
|
{
|
|
}
|
|
array[2] = array2;
|
|
if (", final: " != 0)
|
|
{
|
|
}
|
|
array[3] = ", final: ";
|
|
ulong[] array3 = this.tweak;
|
|
if (array3 != 0)
|
|
{
|
|
}
|
|
array[4] = array3;
|
|
return string.Concat(array);
|
|
}
|
|
|
|
// Token: 0x04006919 RID: 26905
|
|
[Token(Token = "0x4006919")]
|
|
private const ulong LOW_RANGE = 18446744069414584320UL;
|
|
|
|
// Token: 0x0400691A RID: 26906
|
|
[Token(Token = "0x400691A")]
|
|
private const ulong T1_FINAL = 9223372036854775808UL;
|
|
|
|
// Token: 0x0400691B RID: 26907
|
|
[Token(Token = "0x400691B")]
|
|
private const ulong T1_FIRST = 4611686018427387904UL;
|
|
|
|
// Token: 0x0400691C RID: 26908
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400691C")]
|
|
private ulong[] tweak;
|
|
|
|
// Token: 0x0400691D RID: 26909
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400691D")]
|
|
private bool extendedPosition;
|
|
}
|
|
|
|
// Token: 0x02001725 RID: 5925
|
|
[Token(Token = "0x2001725")]
|
|
private class UBI
|
|
{
|
|
// Token: 0x0600A025 RID: 40997 RVA: 0x00252310 File Offset: 0x00250510
|
|
[Token(Token = "0x600A025")]
|
|
[Address(RVA = "0x2064B60", Offset = "0x2063560", VA = "0x182064B60")]
|
|
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: 0x0600A026 RID: 40998 RVA: 0x00252378 File Offset: 0x00250578
|
|
[Token(Token = "0x600A026")]
|
|
[Address(RVA = "0x2064830", Offset = "0x2063230", VA = "0x182064830")]
|
|
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: 0x0600A027 RID: 40999 RVA: 0x00252420 File Offset: 0x00250620
|
|
[Token(Token = "0x600A027")]
|
|
[Address(RVA = "0x2064950", Offset = "0x2063350", VA = "0x182064950")]
|
|
public void Reset(int type)
|
|
{
|
|
this.tweak.Reset();
|
|
this.tweak.tweak[1] = (ulong)type;
|
|
this.currentOffset = (int)((ulong)0L);
|
|
}
|
|
|
|
// Token: 0x0600A028 RID: 41000 RVA: 0x0025245C File Offset: 0x0025065C
|
|
[Token(Token = "0x600A028")]
|
|
[Address(RVA = "0x20649E0", Offset = "0x20633E0", VA = "0x1820649E0")]
|
|
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: 0x0600A029 RID: 41001 RVA: 0x002524EC File Offset: 0x002506EC
|
|
[Token(Token = "0x600A029")]
|
|
[Address(RVA = "0x2064690", Offset = "0x2063090", VA = "0x182064690")]
|
|
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: 0x0600A02A RID: 41002 RVA: 0x002525AC File Offset: 0x002507AC
|
|
[Token(Token = "0x600A02A")]
|
|
[Address(RVA = "0x20645F0", Offset = "0x2062FF0", VA = "0x1820645F0")]
|
|
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: 0x0400691E RID: 26910
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x10")]
|
|
[Token(Token = "0x400691E")]
|
|
private readonly SkeinEngine.UbiTweak tweak;
|
|
|
|
// Token: 0x0400691F RID: 26911
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x18")]
|
|
[Token(Token = "0x400691F")]
|
|
private readonly SkeinEngine engine;
|
|
|
|
// Token: 0x04006920 RID: 26912
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x20")]
|
|
[Token(Token = "0x4006920")]
|
|
private byte[] currentBlock;
|
|
|
|
// Token: 0x04006921 RID: 26913
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x28")]
|
|
[Token(Token = "0x4006921")]
|
|
private int currentOffset;
|
|
|
|
// Token: 0x04006922 RID: 26914
|
|
[global::Cpp2IlInjected.FieldOffset(Offset = "0x30")]
|
|
[Token(Token = "0x4006922")]
|
|
private ulong[] message;
|
|
}
|
|
}
|
|
}
|