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: 0x02001CFE RID: 7422 [Token(Token = "0x2001CFE")] public class SkeinEngine : IMemoable { // Token: 0x0600BBD7 RID: 48087 RVA: 0x002A9678 File Offset: 0x002A7878 [Token(Token = "0x600BBD7")] [Address(RVA = "0x1FE5870", Offset = "0x1FE4670", VA = "0x181FE5870")] static SkeinEngine() { ulong[] array = new ulong[4]; RuntimeHelpers.InitializeArray(array, fieldof(.FCDDAA37B8499E00EB7B606D8540AA64DE5AE4D4).FieldHandle); SkeinEngine.InitialState(256, 128, array); RuntimeHelpers.InitializeArray(new ulong[4], fieldof(.3C3704DB6466D48DD40FE189070F1896D1D45C8B).FieldHandle); RuntimeHelpers.InitializeArray(new ulong[4], fieldof(.FD9088D5287E3E3A6699200CB6E5DE3E9FDEDD9F).FieldHandle); ulong[] array2 = new ulong[4]; RuntimeHelpers.InitializeArray(array2, fieldof(.0B1E7265E67D2458D8EB536A4B36380A5BF6E731).FieldHandle); SkeinEngine.InitialState(256, 256, array2); ulong[] array3 = new ulong[8]; RuntimeHelpers.InitializeArray(array3, fieldof(.DA7CFA4F9698F5D02C5D90A5858F65EE43B4D564).FieldHandle); SkeinEngine.InitialState(512, 128, array3); ulong[] array4 = new ulong[8]; RuntimeHelpers.InitializeArray(array4, fieldof(.959C1F7BD85779AAF7AA136A20A9C399A5019AEC).FieldHandle); SkeinEngine.InitialState(512, 160, array4); ulong[] array5 = new ulong[8]; RuntimeHelpers.InitializeArray(array5, fieldof(.5318DA9ACB77B4E0953DA6BF6B04DF138D74EA1E).FieldHandle); SkeinEngine.InitialState(512, 224, array5); ulong[] array6 = new ulong[8]; RuntimeHelpers.InitializeArray(array6, fieldof(.F0AEF81E2E3EC0843206EBA7D65BCD1AF83DE7C9).FieldHandle); SkeinEngine.InitialState(512, 384, array6); ulong[] array7 = new ulong[8]; RuntimeHelpers.InitializeArray(array7, fieldof(.118FE9754A9699004D478E4BF686021154D96EAD).FieldHandle); SkeinEngine.InitialState(512, 512, array7); } // Token: 0x0600BBD8 RID: 48088 RVA: 0x002A97AC File Offset: 0x002A79AC [Token(Token = "0x600BBD8")] [Address(RVA = "0x1FE5120", Offset = "0x1FE3F20", VA = "0x181FE5120")] 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: 0x0600BBD9 RID: 48089 RVA: 0x002A97D4 File Offset: 0x002A79D4 [Token(Token = "0x600BBD9")] [Address(RVA = "0x1FE5860", Offset = "0x1FE4660", VA = "0x181FE5860")] private static int VariantIdentifier(int blockSizeBytes, int outputSizeBytes) { return outputSizeBytes; } // Token: 0x0600BBDA RID: 48090 RVA: 0x002A97E4 File Offset: 0x002A79E4 [Token(Token = "0x600BBDA")] [Address(RVA = "0x1FE5AE0", Offset = "0x1FE48E0", VA = "0x181FE5AE0")] public SkeinEngine(int blockSizeBits, int outputSizeBits) { /* An exception occurred when decompiling this method (0600BBDA) 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: 0x0600BBDB RID: 48091 RVA: 0x002A98AC File Offset: 0x002A7AAC [Token(Token = "0x600BBDB")] [Address(RVA = "0x1FE5CD0", Offset = "0x1FE4AD0", VA = "0x181FE5CD0")] public SkeinEngine(SkeinEngine engine) { bool isPartialBlockOkay = engine.threefish.IsPartialBlockOkay; this.CopyIn(engine); } // Token: 0x0600BBDC RID: 48092 RVA: 0x002A98D4 File Offset: 0x002A7AD4 [Token(Token = "0x600BBDC")] [Address(RVA = "0x1FE3DF0", Offset = "0x1FE2BF0", VA = "0x181FE3DF0")] 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: 0x0600BBDD RID: 48093 RVA: 0x002A9A2C File Offset: 0x002A7C2C [Token(Token = "0x600BBDD")] [Address(RVA = "0x1FE3D50", Offset = "0x1FE2B50", VA = "0x181FE3D50")] 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: 0x0600BBDE RID: 48094 RVA: 0x002A9A80 File Offset: 0x002A7C80 [Token(Token = "0x600BBDE")] [Address(RVA = "0x1FE4000", Offset = "0x1FE2E00", VA = "0x181FE4000", Slot = "4")] public IMemoable Copy() { bool isPartialBlockOkay = this.threefish.IsPartialBlockOkay; SkeinEngine skeinEngine; skeinEngine.CopyIn(this); throw new NullReferenceException(); } // Token: 0x0600BBDF RID: 48095 RVA: 0x002A9AA8 File Offset: 0x002A7CA8 [Token(Token = "0x600BBDF")] [Address(RVA = "0x1FE5510", Offset = "0x1FE4310", VA = "0x181FE5510", Slot = "5")] public void Reset(IMemoable other) { /* An exception occurred when decompiling this method (0600BBDF) 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: 0x17001D26 RID: 7462 // (get) Token: 0x0600BBE0 RID: 48096 RVA: 0x002A9AF0 File Offset: 0x002A7CF0 [Token(Token = "0x17001D26")] public int OutputSize { [Token(Token = "0x600BBE0")] [Address(RVA = "0x40B720", Offset = "0x40A520", VA = "0x18040B720")] get { return this.outputSizeBytes; } } // Token: 0x17001D27 RID: 7463 // (get) Token: 0x0600BBE1 RID: 48097 RVA: 0x002A9B04 File Offset: 0x002A7D04 [Token(Token = "0x17001D27")] public int BlockSize { [Token(Token = "0x600BBE1")] [Address(RVA = "0x5F5E10", Offset = "0x5F4C10", VA = "0x1805F5E10")] get { string algorithmName = ((IBlockCipher)this.threefish).AlgorithmName; throw new NullReferenceException(); } } // Token: 0x0600BBE2 RID: 48098 RVA: 0x002A9B24 File Offset: 0x002A7D24 [Token(Token = "0x600BBE2")] [Address(RVA = "0x1FE5060", Offset = "0x1FE3E60", VA = "0x181FE5060")] 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: 0x0600BBE3 RID: 48099 RVA: 0x002A9B7C File Offset: 0x002A7D7C [Token(Token = "0x600BBE3")] [Address(RVA = "0x1FE4C60", Offset = "0x1FE3A60", VA = "0x181FE4C60")] 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: 0x0600BBE4 RID: 48100 RVA: 0x002A9C34 File Offset: 0x002A7E34 [Token(Token = "0x600BBE4")] [Address(RVA = "0x1FE40A0", Offset = "0x1FE2EA0", VA = "0x181FE40A0")] 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: 0x0600BBE5 RID: 48101 RVA: 0x002A9EE0 File Offset: 0x002A80E0 [Token(Token = "0x600BBE5")] [Address(RVA = "0x1FE54C0", Offset = "0x1FE42C0", VA = "0x181FE54C0")] 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: 0x0600BBE6 RID: 48102 RVA: 0x002A9F20 File Offset: 0x002A8120 [Token(Token = "0x600BBE6")] [Address(RVA = "0x1FE5630", Offset = "0x1FE4430", VA = "0x181FE5630")] 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: 0x0600BBE7 RID: 48103 RVA: 0x002A9F74 File Offset: 0x002A8174 [Token(Token = "0x600BBE7")] [Address(RVA = "0x1FE56D0", Offset = "0x1FE44D0", VA = "0x181FE56D0")] 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: 0x0600BBE8 RID: 48104 RVA: 0x002A9FB4 File Offset: 0x002A81B4 [Token(Token = "0x600BBE8")] [Address(RVA = "0x1FE56A0", Offset = "0x1FE44A0", VA = "0x181FE56A0")] private void UbiFinal() { SkeinEngine.UBI ubi = this.ubi; ulong[] array = this.chain; ubi.DoFinal(array); } // Token: 0x0600BBE9 RID: 48105 RVA: 0x002A9FDC File Offset: 0x002A81DC [Token(Token = "0x600BBE9")] [Address(RVA = "0x1FE3CE0", Offset = "0x1FE2AE0", VA = "0x181FE3CE0")] private void CheckInitialised() { /* An exception occurred when decompiling this method (0600BBE9) 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: 0x0600BBEA RID: 48106 RVA: 0x002AA000 File Offset: 0x002A8200 [Token(Token = "0x600BBEA")] [Address(RVA = "0x1FE5810", Offset = "0x1FE4610", VA = "0x181FE5810")] public void Update(byte inByte) { this.singleByte[0] = inByte; byte[] array = this.singleByte; int num = 0; this.Update(array, num, 1); } // Token: 0x0600BBEB RID: 48107 RVA: 0x002AA034 File Offset: 0x002A8234 [Token(Token = "0x600BBEB")] [Address(RVA = "0x1FE5760", Offset = "0x1FE4560", VA = "0x181FE5760")] public void Update(byte[] inBytes, int inOff, int len) { /* An exception occurred when decompiling this method (0600BBEB) 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: 0x0600BBEC RID: 48108 RVA: 0x002AA068 File Offset: 0x002A8268 [Token(Token = "0x600BBEC")] [Address(RVA = "0x1FE4710", Offset = "0x1FE3510", VA = "0x181FE4710")] public int DoFinal(byte[] outBytes, int outOff) { /* An exception occurred when decompiling this method (0600BBEC) 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: 0x0600BBED RID: 48109 RVA: 0x002AA2C4 File Offset: 0x002A84C4 [Token(Token = "0x600BBED")] [Address(RVA = "0x1FE5260", Offset = "0x1FE4060", VA = "0x181FE5260")] 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: 0x04007748 RID: 30536 [Token(Token = "0x4007748")] public const int SKEIN_256 = 256; // Token: 0x04007749 RID: 30537 [Token(Token = "0x4007749")] public const int SKEIN_512 = 512; // Token: 0x0400774A RID: 30538 [Token(Token = "0x400774A")] public const int SKEIN_1024 = 1024; // Token: 0x0400774B RID: 30539 [Token(Token = "0x400774B")] private const int PARAM_TYPE_KEY = 0; // Token: 0x0400774C RID: 30540 [Token(Token = "0x400774C")] private const int PARAM_TYPE_CONFIG = 4; // Token: 0x0400774D RID: 30541 [Token(Token = "0x400774D")] private const int PARAM_TYPE_MESSAGE = 48; // Token: 0x0400774E RID: 30542 [Token(Token = "0x400774E")] private const int PARAM_TYPE_OUTPUT = 63; // Token: 0x0400774F RID: 30543 [Token(Token = "0x400774F")] private static readonly IDictionary INITIAL_STATES = Platform.CreateHashtable(); // Token: 0x04007750 RID: 30544 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007750")] private readonly ThreefishEngine threefish; // Token: 0x04007751 RID: 30545 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4007751")] private readonly int outputSizeBytes; // Token: 0x04007752 RID: 30546 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4007752")] private ulong[] chain; // Token: 0x04007753 RID: 30547 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4007753")] private ulong[] initialState; // Token: 0x04007754 RID: 30548 [FieldOffset(Offset = "0x30")] [Token(Token = "0x4007754")] private byte[] key; // Token: 0x04007755 RID: 30549 [FieldOffset(Offset = "0x38")] [Token(Token = "0x4007755")] private SkeinEngine.Parameter[] preMessageParameters; // Token: 0x04007756 RID: 30550 [FieldOffset(Offset = "0x40")] [Token(Token = "0x4007756")] private SkeinEngine.Parameter[] postMessageParameters; // Token: 0x04007757 RID: 30551 [FieldOffset(Offset = "0x48")] [Token(Token = "0x4007757")] private readonly SkeinEngine.UBI ubi; // Token: 0x04007758 RID: 30552 [FieldOffset(Offset = "0x50")] [Token(Token = "0x4007758")] private readonly byte[] singleByte; // Token: 0x02001CFF RID: 7423 [Token(Token = "0x2001CFF")] private class Configuration { // Token: 0x0600BBEE RID: 48110 RVA: 0x002AA36C File Offset: 0x002A856C [Token(Token = "0x600BBEE")] [Address(RVA = "0x1FD39C0", Offset = "0x1FD27C0", VA = "0x181FD39C0")] 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: 0x17001D28 RID: 7464 // (get) Token: 0x0600BBEF RID: 48111 RVA: 0x002AA3D4 File Offset: 0x002A85D4 [Token(Token = "0x17001D28")] public byte[] Bytes { [Token(Token = "0x600BBEF")] [Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")] get { return this.bytes; } } // Token: 0x04007759 RID: 30553 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007759")] private byte[] bytes; } // Token: 0x02001D00 RID: 7424 [Token(Token = "0x2001D00")] public class Parameter { // Token: 0x0600BBF0 RID: 48112 RVA: 0x002AA3E8 File Offset: 0x002A85E8 [Token(Token = "0x600BBF0")] [Address(RVA = "0x4E6E10", Offset = "0x4E5C10", VA = "0x1804E6E10")] public Parameter(int type, byte[] value) { this.type = type; this.value = value; } // Token: 0x17001D29 RID: 7465 // (get) Token: 0x0600BBF1 RID: 48113 RVA: 0x002AA40C File Offset: 0x002A860C [Token(Token = "0x17001D29")] public int Type { [Token(Token = "0x600BBF1")] [Address(RVA = "0x3FA560", Offset = "0x3F9360", VA = "0x1803FA560")] get { return this.type; } } // Token: 0x17001D2A RID: 7466 // (get) Token: 0x0600BBF2 RID: 48114 RVA: 0x002AA420 File Offset: 0x002A8620 [Token(Token = "0x17001D2A")] public byte[] Value { [Token(Token = "0x600BBF2")] [Address(RVA = "0x3F5F40", Offset = "0x3F4D40", VA = "0x1803F5F40")] get { return this.value; } } // Token: 0x0400775A RID: 30554 [FieldOffset(Offset = "0x10")] [Token(Token = "0x400775A")] private int type; // Token: 0x0400775B RID: 30555 [FieldOffset(Offset = "0x18")] [Token(Token = "0x400775B")] private byte[] value; } // Token: 0x02001D01 RID: 7425 [Token(Token = "0x2001D01")] private class UbiTweak { // Token: 0x0600BBF3 RID: 48115 RVA: 0x002AA434 File Offset: 0x002A8634 [Token(Token = "0x600BBF3")] [Address(RVA = "0x1FE8B90", Offset = "0x1FE7990", VA = "0x181FE8B90")] public UbiTweak() { ulong[] array = new ulong[2]; this.tweak = array; base..ctor(); this.Reset(); } // Token: 0x0600BBF4 RID: 48116 RVA: 0x002AA45C File Offset: 0x002A865C [Token(Token = "0x600BBF4")] [Address(RVA = "0x1FE8810", Offset = "0x1FE7610", VA = "0x181FE8810")] 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: 0x0600BBF5 RID: 48117 RVA: 0x002AA498 File Offset: 0x002A8698 [Token(Token = "0x600BBF5")] [Address(RVA = "0x1FE8780", Offset = "0x1FE7580", VA = "0x181FE8780")] 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: 0x17001D2B RID: 7467 // (get) Token: 0x0600BBF6 RID: 48118 RVA: 0x002AA4D8 File Offset: 0x002A86D8 // (set) Token: 0x0600BBF7 RID: 48119 RVA: 0x002AA4F8 File Offset: 0x002A86F8 [Token(Token = "0x17001D2B")] public uint Type { [Token(Token = "0x600BBF6")] [Address(RVA = "0x1FE8C70", Offset = "0x1FE7A70", VA = "0x181FE8C70")] get { ulong num = this.tweak[1]; throw new NullReferenceException(); } [Token(Token = "0x600BBF7")] [Address(RVA = "0x1FE8D90", Offset = "0x1FE7B90", VA = "0x181FE8D90")] set { this.tweak[1] = (ulong)value; } } // Token: 0x17001D2C RID: 7468 // (get) Token: 0x0600BBF8 RID: 48120 RVA: 0x002AA518 File Offset: 0x002A8718 // (set) Token: 0x0600BBF9 RID: 48121 RVA: 0x002AA534 File Offset: 0x002A8734 [Token(Token = "0x17001D2C")] public bool First { [Token(Token = "0x600BBF8")] [Address(RVA = "0x1FE8C30", Offset = "0x1FE7A30", VA = "0x181FE8C30")] get { ulong[] array = this.tweak; throw new NullReferenceException(); } [Token(Token = "0x600BBF9")] [Address(RVA = "0x1FE8D20", Offset = "0x1FE7B20", VA = "0x181FE8D20")] set { ulong[] array = this.tweak; if (!value) { return; } } } // Token: 0x17001D2D RID: 7469 // (get) Token: 0x0600BBFA RID: 48122 RVA: 0x002AA554 File Offset: 0x002A8754 // (set) Token: 0x0600BBFB RID: 48123 RVA: 0x002AA570 File Offset: 0x002A8770 [Token(Token = "0x17001D2D")] public bool Final { [Token(Token = "0x600BBFA")] [Address(RVA = "0x1FE8BF0", Offset = "0x1FE79F0", VA = "0x181FE8BF0")] get { ulong[] array = this.tweak; throw new IndexOutOfRangeException(); } [Token(Token = "0x600BBFB")] [Address(RVA = "0x1FE8CB0", Offset = "0x1FE7AB0", VA = "0x181FE8CB0")] set { ulong[] array = this.tweak; if (!value) { return; } } } // Token: 0x0600BBFC RID: 48124 RVA: 0x002AA590 File Offset: 0x002A8790 [Token(Token = "0x600BBFC")] [Address(RVA = "0x1FE84E0", Offset = "0x1FE72E0", VA = "0x181FE84E0")] 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: 0x0600BBFD RID: 48125 RVA: 0x002AA65C File Offset: 0x002A885C [Token(Token = "0x600BBFD")] [Address(RVA = "0x3F6E20", Offset = "0x3F5C20", VA = "0x1803F6E20")] public ulong[] GetWords() { return this.tweak; } // Token: 0x0600BBFE RID: 48126 RVA: 0x002AA670 File Offset: 0x002A8870 [Token(Token = "0x600BBFE")] [Address(RVA = "0x1FE88B0", Offset = "0x1FE76B0", VA = "0x181FE88B0", 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: 0x0400775C RID: 30556 [Token(Token = "0x400775C")] private const ulong LOW_RANGE = 18446744069414584320UL; // Token: 0x0400775D RID: 30557 [Token(Token = "0x400775D")] private const ulong T1_FINAL = 9223372036854775808UL; // Token: 0x0400775E RID: 30558 [Token(Token = "0x400775E")] private const ulong T1_FIRST = 4611686018427387904UL; // Token: 0x0400775F RID: 30559 [FieldOffset(Offset = "0x10")] [Token(Token = "0x400775F")] private ulong[] tweak; // Token: 0x04007760 RID: 30560 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4007760")] private bool extendedPosition; } // Token: 0x02001D02 RID: 7426 [Token(Token = "0x2001D02")] private class UBI { // Token: 0x0600BBFF RID: 48127 RVA: 0x002AA700 File Offset: 0x002A8900 [Token(Token = "0x600BBFF")] [Address(RVA = "0x1FE83F0", Offset = "0x1FE71F0", VA = "0x181FE83F0")] 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: 0x0600BC00 RID: 48128 RVA: 0x002AA768 File Offset: 0x002A8968 [Token(Token = "0x600BC00")] [Address(RVA = "0x1FE80C0", Offset = "0x1FE6EC0", VA = "0x181FE80C0")] 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: 0x0600BC01 RID: 48129 RVA: 0x002AA810 File Offset: 0x002A8A10 [Token(Token = "0x600BC01")] [Address(RVA = "0x1FE81E0", Offset = "0x1FE6FE0", VA = "0x181FE81E0")] public void Reset(int type) { this.tweak.Reset(); this.tweak.tweak[1] = (ulong)type; this.currentOffset = (int)((ulong)0L); } // Token: 0x0600BC02 RID: 48130 RVA: 0x002AA84C File Offset: 0x002A8A4C [Token(Token = "0x600BC02")] [Address(RVA = "0x1FE8270", Offset = "0x1FE7070", VA = "0x181FE8270")] 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: 0x0600BC03 RID: 48131 RVA: 0x002AA8DC File Offset: 0x002A8ADC [Token(Token = "0x600BC03")] [Address(RVA = "0x1FE7F20", Offset = "0x1FE6D20", VA = "0x181FE7F20")] 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: 0x0600BC04 RID: 48132 RVA: 0x002AA99C File Offset: 0x002A8B9C [Token(Token = "0x600BC04")] [Address(RVA = "0x1FE7E80", Offset = "0x1FE6C80", VA = "0x181FE7E80")] 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: 0x04007761 RID: 30561 [FieldOffset(Offset = "0x10")] [Token(Token = "0x4007761")] private readonly SkeinEngine.UbiTweak tweak; // Token: 0x04007762 RID: 30562 [FieldOffset(Offset = "0x18")] [Token(Token = "0x4007762")] private readonly SkeinEngine engine; // Token: 0x04007763 RID: 30563 [FieldOffset(Offset = "0x20")] [Token(Token = "0x4007763")] private byte[] currentBlock; // Token: 0x04007764 RID: 30564 [FieldOffset(Offset = "0x28")] [Token(Token = "0x4007764")] private int currentOffset; // Token: 0x04007765 RID: 30565 [FieldOffset(Offset = "0x30")] [Token(Token = "0x4007765")] private ulong[] message; } } }