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
HMAC.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x020002DA RID: 730
8 [ComVisible(true)]
9 public abstract class HMAC : KeyedHashAlgorithm
10 {
11 // Token: 0x17000299 RID: 665
12 // (get) Token: 0x06001899 RID: 6297 RVA: 0x00034A18 File Offset: 0x00032C18
13 // (set) Token: 0x0600189A RID: 6298 RVA: 0x00034A2C File Offset: 0x00032C2C
14 protected int BlockSizeValue
15 {
16 get
17 {
18 return this.blockSizeValue;
19 }
20 set
21 {
23 }
24 }
25
26 // Token: 0x0600189B RID: 6299 RVA: 0x00034A40 File Offset: 0x00032C40
27 private void UpdateIOPadBuffers()
28 {
29 if (this.m_inner == null)
30 {
31 int num = this.blockSizeValue;
32 }
33 if (this.m_outer == null)
34 {
35 int num2 = this.blockSizeValue;
36 }
37 int num3 = this.blockSizeValue;
38 int num4 = 54;
39 int num5 = 92;
42 byte[] keyValue = this.KeyValue;
44 byte[] outer = this.m_outer;
45 byte[] keyValue2 = this.KeyValue;
47 byte[] keyValue3 = this.KeyValue;
48 }
49
50 // Token: 0x0600189C RID: 6300 RVA: 0x00034AD0 File Offset: 0x00032CD0
51 internal void InitializeKey(byte[] key)
52 {
53 int num = this.blockSizeValue;
54 byte[] array = this.m_hash1.ComputeHash(key);
56 }
57
58 // Token: 0x1700029A RID: 666
59 // (get) Token: 0x0600189D RID: 6301 RVA: 0x00034B18 File Offset: 0x00032D18
60 // (set) Token: 0x0600189E RID: 6302 RVA: 0x00034B38 File Offset: 0x00032D38
61 public override byte[] Key
62 {
63 get
64 {
65 byte[] keyValue = this.KeyValue;
66 object obj;
67 if (obj == null || obj != null)
68 {
69 }
70 throw new InvalidCastException();
71 }
72 set
73 {
74 /*
75An exception occurred when decompiling this method (0600189E)
76
77ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Security.Cryptography.HMAC::set_Key(System.Byte[])
78
79 ---> System.Exception: Basic block has to end with unconditional control flow.
80{
81 IL_0010:
82 stloc:string(var_0_1A, call:string(Environment::GetResourceString, ldstr:string("Hash key cannot be changed after the first write to the stream.")))
83}
84
85 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
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 1878
87 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
88 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
89 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
90 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
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 88
92 --- End of inner exception stack trace ---
93 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
94 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
95*/;
96 }
97 }
98
99 // Token: 0x1700029B RID: 667
100 // (get) Token: 0x0600189F RID: 6303 RVA: 0x00034B60 File Offset: 0x00032D60
101 // (set) Token: 0x060018A0 RID: 6304 RVA: 0x00034B74 File Offset: 0x00032D74
102 public string HashName
103 {
104 get
105 {
106 return this.m_hashName;
107 }
108 set
109 {
110 /*
111An exception occurred when decompiling this method (060018A0)
112
113ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Security.Cryptography.HMAC::set_HashName(System.String)
114
115 ---> System.Exception: Basic block has to end with unconditional control flow.
116{
117 IL_0033:
118 stloc:string(var_3_3D, call:string(Environment::GetResourceString, ldstr:string("Hash name cannot be changed after the first write to the stream.")))
119}
120
121 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
122 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
123 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
124 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
125 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
126 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
127 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
128 --- End of inner exception stack trace ---
129 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
130 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
131*/;
132 }
133 }
134
135 // Token: 0x060018A1 RID: 6305 RVA: 0x0000207A File Offset: 0x0000027A
136 public new static HMAC Create()
137 {
138 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
139 }
140
141 // Token: 0x060018A2 RID: 6306 RVA: 0x00034BC0 File Offset: 0x00032DC0
142 public new static HMAC Create(string algorithmName)
143 {
144 if (!true)
145 {
146 }
147 object obj;
148 if (obj != null)
149 {
150 }
151 throw new InvalidCastException();
152 }
153
154 // Token: 0x060018A3 RID: 6307 RVA: 0x00034BD8 File Offset: 0x00032DD8
155 public override void Initialize()
156 {
157 HashAlgorithm hash = this.m_hash1;
159 }
160
161 // Token: 0x060018A4 RID: 6308 RVA: 0x00034BF4 File Offset: 0x00032DF4
162 protected override void HashCore(byte[] rgb, int ib, int cb)
163 {
164 if (!this.m_hashing)
165 {
166 byte[] inner = this.m_inner;
167 HashAlgorithm hash = this.m_hash1;
168 this.m_hashing = true;
169 }
171 }
172
173 // Token: 0x060018A5 RID: 6309 RVA: 0x00034C28 File Offset: 0x00032E28
174 protected override byte[] HashFinal()
175 {
176 if (!this.m_hashing)
177 {
178 byte[] inner = this.m_inner;
179 HashAlgorithm hash = this.m_hash1;
180 this.m_hashing = true;
181 }
183 if (!true)
184 {
185 }
186 long num = 0L;
187 byte[] outer = this.m_outer;
190 long num2 = 0L;
191 long num3 = 0L;
192 byte[] hashValue = hash3.HashValue;
193 int num4 = hash4.TransformBlock(outer, (int)num2, (int)num, outer, (int)num3);
195 long num5 = 0L;
196 long num6 = 0L;
197 int num7 = hash5.TransformBlock(hashValue, (int)num5, (int)num, hashValue, (int)num6);
199 return this.m_hash2.HashValue;
200 }
201
202 // Token: 0x060018A6 RID: 6310 RVA: 0x00034CD0 File Offset: 0x00032ED0
203 protected override void Dispose(bool disposing)
204 {
205 if (this.m_hash1 != null)
206 {
207 return;
208 }
209 long num;
210 if (this.m_hash2 != null)
211 {
212 num = 0L;
213 return;
214 }
215 byte[] inner = this.m_inner;
216 if (inner != null)
217 {
218 long num2 = 0L;
219 Array.Clear(inner, (int)num2, (int)num);
220 }
221 byte[] outer = this.m_outer;
222 if (outer != null)
223 {
224 long num3 = 0L;
225 Array.Clear(outer, (int)num3, (int)num);
226 }
227 byte[] keyValue = this.KeyValue;
228 if (keyValue != null)
229 {
230 long num4 = 0L;
231 Array.Clear(keyValue, (int)num4, (int)num);
232 }
233 int num5 = 1;
234 this._disposed = num5 != 0;
235 }
236
237 // Token: 0x060018A7 RID: 6311 RVA: 0x00034D40 File Offset: 0x00032F40
239 {
240 /*
241An exception occurred when decompiling this method (060018A7)
242
243ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Security.Cryptography.HashAlgorithm System.Security.Cryptography.HMAC::GetHashAlgorithmWithFipsFallback(System.Func`1<System.Security.Cryptography.HashAlgorithm>,System.Func`1<System.Security.Cryptography.HashAlgorithm>)
244
245 ---> System.Exception: Basic block has to end with unconditional control flow.
246{
247 IL_0003:
248 stloc:bool(var_1_0A, callgetter:bool(CryptoConfig::get_AllowOnlyFipsAlgorithms))
249}
250
251 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
252 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
253 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
254 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
255 --- End of inner exception stack trace ---
256 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
257 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
258*/;
259 }
260
261 // Token: 0x060018A8 RID: 6312 RVA: 0x00034D5C File Offset: 0x00032F5C
262 protected HMAC()
263 {
264 }
265
266 // Token: 0x04000CB1 RID: 3249
267 private int blockSizeValue = 64;
268
269 // Token: 0x04000CB2 RID: 3250
270 internal string m_hashName;
271
272 // Token: 0x04000CB3 RID: 3251
274
275 // Token: 0x04000CB4 RID: 3252
277
278 // Token: 0x04000CB5 RID: 3253
279 private byte[] m_inner;
280
281 // Token: 0x04000CB6 RID: 3254
282 private byte[] m_outer;
283
284 // Token: 0x04000CB7 RID: 3255
285 private bool m_hashing;
286 }
287}
class f__AnonymousType0<< Count > j__TPar
void IList. Clear()
Definition Array.cs:99
static new HMAC Create(string algorithmName)
Definition HMAC.cs:142
override void HashCore(byte[] rgb, int ib, int cb)
Definition HMAC.cs:162
override byte[] HashFinal()
Definition HMAC.cs:174
override void Dispose(bool disposing)
Definition HMAC.cs:203
override void Initialize()
Definition HMAC.cs:155
static HashAlgorithm GetHashAlgorithmWithFipsFallback(Func< HashAlgorithm > createStandardHashAlgorithmCallback, Func< HashAlgorithm > createFipsHashAlgorithmCallback)
Definition HMAC.cs:238
static new HMAC Create()
Definition HMAC.cs:136
void InitializeKey(byte[] key)
Definition HMAC.cs:51
int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)