terraria-cpp2il-methodrecon v1.4.4.9
Terraria mobile dump, with reconstructed method body. Dump with CallAnalysis: https://infinitynichto.github.io/terraria-cpp2il
Loading...
Searching...
No Matches
SHA1Managed.cs
Go to the documentation of this file.
1using System;
3
5{
6 // Token: 0x020002FA RID: 762
7 [ComVisible(true)]
8 public class SHA1Managed : SHA1
9 {
10 // Token: 0x060019CD RID: 6605 RVA: 0x000377A0 File Offset: 0x000359A0
11 public SHA1Managed()
12 {
14 if (160 == 0)
15 {
16 }
17 uint[] stateSHA = this._stateSHA1;
18 }
19
20 // Token: 0x060019CE RID: 6606 RVA: 0x000377CC File Offset: 0x000359CC
21 public override void Initialize()
22 {
23 uint[] stateSHA = this._stateSHA1;
24 byte[] buffer = this._buffer;
25 uint[] expandedBuffer = this._expandedBuffer;
26 }
27
28 // Token: 0x060019CF RID: 6607 RVA: 0x000377F0 File Offset: 0x000359F0
29 protected override void HashCore(byte[] rgb, int ibStart, int cbSize)
30 {
31 this._HashData(rgb, ibStart, cbSize);
32 }
33
34 // Token: 0x060019D0 RID: 6608 RVA: 0x00037808 File Offset: 0x00035A08
35 protected override byte[] HashFinal()
36 {
37 return this._EndHash();
38 }
39
40 // Token: 0x060019D1 RID: 6609 RVA: 0x0003781C File Offset: 0x00035A1C
41 private void InitializeState()
42 {
43 uint[] stateSHA = this._stateSHA1;
44 }
45
46 // Token: 0x060019D2 RID: 6610 RVA: 0x00037830 File Offset: 0x00035A30
47 private void _HashData(byte[] partIn, int ibStart, int cbSize)
48 {
49 long count = this._count;
50 if (this._stateSHA1 != null)
51 {
52 return;
53 }
54 if (this._buffer != null)
55 {
56 return;
57 }
58 if (this._expandedBuffer != null)
59 {
60 return;
61 }
62 long num = 0L;
63 byte[] buffer = this._buffer;
64 int num2 = 64;
65 bool flag = Buffer.InternalBlockCopy(partIn, ibStart, buffer, cbSize, num2);
66 byte[] buffer2 = this._buffer;
67 bool flag2 = Buffer.InternalBlockCopy(partIn, ibStart, buffer2, (int)num, cbSize);
68 }
69
70 // Token: 0x060019D3 RID: 6611 RVA: 0x00037894 File Offset: 0x00035A94
71 private byte[] _EndHash()
72 {
73 /*
74An exception occurred when decompiling this method (060019D3)
75
76ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] System.Security.Cryptography.SHA1Managed::_EndHash()
77
78 ---> System.Exception: Basic block has to end with unconditional control flow.
79{
80 Block_0:
81 stloc:int64(var_1_09, ldfld:int64(SHA1Managed::_count, ldloc:SHA1Managed(this)))
82 stloc:int64(var_2_10, ldfld:int64(SHA1Managed::_count, ldloc:SHA1Managed(this)))
83 stloc:uint32[](var_3_17, ldfld:uint32[](SHA1Managed::_stateSHA1, ldloc:SHA1Managed(this)))
84}
85
86 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
87 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
88 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
89 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
90 --- End of inner exception stack trace ---
91 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
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 1683
93*/;
94 }
95
96 // Token: 0x060019D4 RID: 6612 RVA: 0x000378B8 File Offset: 0x00035AB8
97 private unsafe static void SHATransform(uint* expandedBuffer, uint* state, byte* block)
98 {
99 int num = 1;
100 uint value = state->m_value;
101 if (num == 0)
102 {
103 }
104 int num2 = 16;
107 uint value2 = expandedBuffer->m_value;
108 int num3 = 60321;
109 int value3 = num3.m_value;
110 uint value4 = state->m_value;
111 state->m_value = value4;
112 }
113
114 // Token: 0x060019D5 RID: 6613 RVA: 0x0003791C File Offset: 0x00035B1C
115 private unsafe static void SHAExpand(uint* x)
116 {
117 }
118
119 // Token: 0x04000D13 RID: 3347
120 private byte[] _buffer;
121
122 // Token: 0x04000D14 RID: 3348
123 private long _count;
124
125 // Token: 0x04000D15 RID: 3349
126 private uint[] _stateSHA1;
127
128 // Token: 0x04000D16 RID: 3350
129 private uint[] _expandedBuffer;
130 }
131}
class f__AnonymousType0<< Count > j__TPar
static bool InternalBlockCopy(Array src, int srcOffsetBytes, Array dst, int dstOffsetBytes, int byteCount)
Definition Buffer.cs:13
override void HashCore(byte[] rgb, int ibStart, int cbSize)
static unsafe void SHAExpand(uint *x)
static unsafe void SHATransform(uint *expandedBuffer, uint *state, byte *block)
void _HashData(byte[] partIn, int ibStart, int cbSize)
static unsafe void DWORDFromBigEndian(uint *x, int digits, byte *block)
Definition Utils.cs:134