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
PasswordDeriveBytes.cs
Go to the documentation of this file.
1using System;
3
5{
6 // Token: 0x020002E7 RID: 743
7 [ComVisible(true)]
9 {
10 // Token: 0x060018E5 RID: 6373 RVA: 0x0003556C File Offset: 0x0003376C
12 {
13 }
14
15 // Token: 0x060018E6 RID: 6374 RVA: 0x0003557C File Offset: 0x0003377C
16 public PasswordDeriveBytes(byte[] password, byte[] salt)
17 {
18 }
19
20 // Token: 0x060018E7 RID: 6375 RVA: 0x0003558C File Offset: 0x0003378C
21 public PasswordDeriveBytes(string strPassword, byte[] rgbSalt, string strHashName, int iterations)
22 {
23 }
24
25 // Token: 0x060018E8 RID: 6376 RVA: 0x0003559C File Offset: 0x0003379C
26 public PasswordDeriveBytes(byte[] password, byte[] salt, string hashName, int iterations)
27 {
28 }
29
30 // Token: 0x060018E9 RID: 6377 RVA: 0x000355AC File Offset: 0x000337AC
34
35 // Token: 0x060018EA RID: 6378 RVA: 0x000355BC File Offset: 0x000337BC
36 public PasswordDeriveBytes(byte[] password, byte[] salt, CspParameters cspParams)
37 {
38 }
39
40 // Token: 0x060018EB RID: 6379 RVA: 0x000355CC File Offset: 0x000337CC
44
45 // Token: 0x060018EC RID: 6380 RVA: 0x000355DC File Offset: 0x000337DC
46 public PasswordDeriveBytes(byte[] password, byte[] salt, string hashName, int iterations, CspParameters cspParams)
47 {
50 this.HashName = hashName;
51 this._password = password;
52 }
53
54 // Token: 0x170002AC RID: 684
55 // (get) Token: 0x060018ED RID: 6381 RVA: 0x0003560C File Offset: 0x0003380C
56 // (set) Token: 0x060018EE RID: 6382 RVA: 0x00035620 File Offset: 0x00033820
57 public string HashName
58 {
59 get
60 {
61 return this._hashName;
62 }
63 set
64 {
65 if (this._baseValue != null)
66 {
68 }
71 if (obj != null)
72 {
74 throw new InvalidCastException();
75 }
76 }
77 }
78
79 // Token: 0x170002AD RID: 685
80 // (get) Token: 0x060018EF RID: 6383 RVA: 0x0003565C File Offset: 0x0003385C
81 // (set) Token: 0x060018F0 RID: 6384 RVA: 0x00035670 File Offset: 0x00033870
82 public int IterationCount
83 {
84 get
85 {
86 return this._iterations;
87 }
88 set
89 {
90 if (this._baseValue == null)
91 {
93 return;
94 }
96 }
97 }
98
99 // Token: 0x170002AE RID: 686
100 // (get) Token: 0x060018F1 RID: 6385 RVA: 0x000356A0 File Offset: 0x000338A0
101 // (set) Token: 0x060018F2 RID: 6386 RVA: 0x000356C0 File Offset: 0x000338C0
102 public byte[] Salt
103 {
104 get
105 {
106 object obj;
107 if (this._salt == null || obj == null || obj != null)
108 {
109 }
110 throw new InvalidCastException();
111 }
112 set
113 {
114 if (this._baseValue == null)
115 {
116 object obj;
117 if (value != null && obj != null)
118 {
119 if (obj == null)
120 {
121 throw new InvalidCastException();
122 }
123 this._salt = obj;
124 if (obj == null)
125 {
126 throw new InvalidCastException();
127 }
128 }
129 return;
130 }
131 throw new ArrayTypeMismatchException();
132 }
133 }
134
135 // Token: 0x060018F3 RID: 6387 RVA: 0x000356FC File Offset: 0x000338FC
136 [Obsolete("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")]
137 public override byte[] GetBytes(int cb)
138 {
139 /*
140An exception occurred when decompiling this method (060018F3)
141
142ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] System.Security.Cryptography.PasswordDeriveBytes::GetBytes(System.Int32)
143
144 ---> System.Exception: Basic block has to end with unconditional control flow.
145{
146 IL_001E:
147 stloc:uint8[](var_4_27, call:uint8[](PasswordDeriveBytes::ComputeBytes, ldloc:PasswordDeriveBytes(this), ldloc:int32(var_0)))
148 stfld:uint8[](PasswordDeriveBytes::_extra, ldloc:PasswordDeriveBytes(this), ldloc:uint8[](var_4_27))
149 stloc:int32(var_7_37, ldfld:int32(PasswordDeriveBytes::_extraCount, ldloc:PasswordDeriveBytes(this)))
150 stfld:int32(PasswordDeriveBytes::_extraCount, ldloc:PasswordDeriveBytes(this), ldloc:int32(var_7_37))
151}
152
153 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
154 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
155 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
156 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
157 --- End of inner exception stack trace ---
158 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
159 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
160*/;
161 }
162
163 // Token: 0x060018F4 RID: 6388 RVA: 0x0003574C File Offset: 0x0003394C
164 public override void Reset()
165 {
166 }
167
168 // Token: 0x060018F5 RID: 6389 RVA: 0x0003575C File Offset: 0x0003395C
169 protected override void Dispose(bool disposing)
170 {
171 HashAlgorithm hash = this._hash;
172 if (hash != null)
173 {
174 hash.Dispose();
175 }
176 if (this._baseValue != null)
177 {
178 }
179 if (this._extra != null)
180 {
181 }
182 if (this._password != null)
183 {
184 }
185 if (this._salt != null)
186 {
187 return;
188 }
189 }
190
191 // Token: 0x060018F6 RID: 6390 RVA: 0x0003579C File Offset: 0x0003399C
192 public byte[] CryptDeriveKey(string algname, string alghashname, int keySize, byte[] rgbIV)
193 {
194 /*
195An exception occurred when decompiling this method (060018F6)
196
197ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] System.Security.Cryptography.PasswordDeriveBytes::CryptDeriveKey(System.String,System.String,System.Int32,System.Byte[])
198
199 ---> System.Exception: Basic block has to end with unconditional control flow.
200{
201 Block_0:
202 stloc:string(var_0_0A, call:string(Environment::GetResourceString, ldstr:string("Specified key is not a valid size for this algorithm.")))
203}
204
205 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
206 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
207 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
208 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
209 --- End of inner exception stack trace ---
210 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
211 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
212*/;
213 }
214
215 // Token: 0x060018F7 RID: 6391 RVA: 0x000357B4 File Offset: 0x000339B4
216 private byte[] ComputeBaseValue()
217 {
218 /*
219An exception occurred when decompiling this method (060018F7)
220
221ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] System.Security.Cryptography.PasswordDeriveBytes::ComputeBaseValue()
222
223 ---> System.Exception: Basic block has to end with unconditional control flow.
224{
225 IL_0025:
226 stloc:HashAlgorithm(var_6_2B, ldfld:HashAlgorithm(PasswordDeriveBytes::_hash, ldloc:PasswordDeriveBytes(this)))
227 stloc:HashAlgorithm(var_8_33, ldfld:HashAlgorithm(PasswordDeriveBytes::_hash, ldloc:PasswordDeriveBytes(this)))
228 stloc:HashAlgorithm(var_9_3B, ldfld:HashAlgorithm(PasswordDeriveBytes::_hash, ldloc:PasswordDeriveBytes(this)))
229 stfld:uint8[](PasswordDeriveBytes::_baseValue, ldloc:PasswordDeriveBytes(this), ldloc:HashAlgorithm[exp:uint8[]](var_8_33))
230 stloc:int32(var_10_4B, ldfld:int32(PasswordDeriveBytes::_iterations, ldloc:PasswordDeriveBytes(this)))
231 stloc:uint8[](var_11_53, ldfld:uint8[](PasswordDeriveBytes::_baseValue, ldloc:PasswordDeriveBytes(this)))
232 stloc:uint8[](var_13_65, call:uint8[](HashAlgorithm::ComputeHash, ldfld:HashAlgorithm(PasswordDeriveBytes::_hash, ldloc:PasswordDeriveBytes(this)), ldloc:uint8[](var_11_53)))
233 stloc:HashAlgorithm(var_14_6D, ldfld:HashAlgorithm(PasswordDeriveBytes::_hash, ldloc:PasswordDeriveBytes(this)))
234 stloc:int32(var_15_75, ldfld:int32(PasswordDeriveBytes::_iterations, ldloc:PasswordDeriveBytes(this)))
235 stfld:uint8[](PasswordDeriveBytes::_baseValue, ldloc:PasswordDeriveBytes(this), ldloc:HashAlgorithm[exp:uint8[]](var_14_6D))
236}
237
238 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
239 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
240 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
241 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
242 --- End of inner exception stack trace ---
243 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
244 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
245*/;
246 }
247
248 // Token: 0x060018F8 RID: 6392 RVA: 0x00035840 File Offset: 0x00033A40
249 private byte[] ComputeBytes(int cb)
250 {
251 HashAlgorithm hash = this._hash;
254 byte[] baseValue = this._baseValue;
255 if (false)
256 {
257 throw new OutOfMemoryException();
258 }
262 byte[] baseValue2 = this._baseValue;
263 long num = 0L;
264 int num2 = 5;
265 if (num != 0L)
266 {
267 throw new OutOfMemoryException();
268 }
269 if (num2 == 0)
270 {
272 }
273 if (false)
274 {
275 throw new OutOfMemoryException();
276 }
277 throw new OutOfMemoryException();
278 }
279
280 // Token: 0x060018F9 RID: 6393 RVA: 0x000358D0 File Offset: 0x00033AD0
282 {
283 int prefix = this._prefix;
284 }
285
286 // Token: 0x04000CC5 RID: 3269
287 private int _extraCount;
288
289 // Token: 0x04000CC6 RID: 3270
290 private int _prefix;
291
292 // Token: 0x04000CC7 RID: 3271
293 private int _iterations;
294
295 // Token: 0x04000CC8 RID: 3272
296 private byte[] _baseValue;
297
298 // Token: 0x04000CC9 RID: 3273
299 private byte[] _extra;
300
301 // Token: 0x04000CCA RID: 3274
302 private byte[] _salt;
303
304 // Token: 0x04000CCB RID: 3275
305 private string _hashName;
306
307 // Token: 0x04000CCC RID: 3276
308 private byte[] _password;
309
310 // Token: 0x04000CCD RID: 3277
312 }
313}
class f__AnonymousType0<< Count > j__TPar
static object CreateFromName(string name)
PasswordDeriveBytes(string strPassword, byte[] rgbSalt, string strHashName, int iterations, CspParameters cspParams)
PasswordDeriveBytes(string strPassword, byte[] rgbSalt, CspParameters cspParams)
PasswordDeriveBytes(byte[] password, byte[] salt, string hashName, int iterations, CspParameters cspParams)
byte[] CryptDeriveKey(string algname, string alghashname, int keySize, byte[] rgbIV)
PasswordDeriveBytes(string strPassword, byte[] rgbSalt, string strHashName, int iterations)
PasswordDeriveBytes(string strPassword, byte[] rgbSalt)
PasswordDeriveBytes(byte[] password, byte[] salt, CspParameters cspParams)
PasswordDeriveBytes(byte[] password, byte[] salt, string hashName, int iterations)