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
Rfc2898DeriveBytes.cs
Go to the documentation of this file.
1using System;
3using System.Text;
6
8{
9 // Token: 0x020002B2 RID: 690
11 {
12 // Token: 0x17000262 RID: 610
13 // (get) Token: 0x0600176B RID: 5995 RVA: 0x000322B8 File Offset: 0x000304B8
15 {
17 get
18 {
19 return this.<HashAlgorithm>k__BackingField;
20 }
21 }
22
23 // Token: 0x0600176C RID: 5996 RVA: 0x000322CC File Offset: 0x000304CC
24 public Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations)
25 {
27 }
28
29 // Token: 0x0600176D RID: 5997 RVA: 0x000322E4 File Offset: 0x000304E4
30 public Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations, HashAlgorithmName hashAlgorithm)
31 {
32 do
33 {
34 base..ctor();
35 if (salt == null)
36 {
37 return;
38 }
39 }
40 while (password == null);
41 byte[] array = salt.CloneByteArray();
44 byte[] array2 = password.CloneByteArray();
46 this.HashAlgorithm = hashAlgorithm;
47 HMAC hmac = this.OpenHmac();
49 this.Initialize();
50 }
51
52 // Token: 0x0600176E RID: 5998 RVA: 0x00032340 File Offset: 0x00030540
53 public Rfc2898DeriveBytes(string password, byte[] salt)
54 {
55 }
56
57 // Token: 0x0600176F RID: 5999 RVA: 0x00032350 File Offset: 0x00030550
58 public Rfc2898DeriveBytes(string password, byte[] salt, int iterations)
59 {
62 }
63
64 // Token: 0x06001770 RID: 6000 RVA: 0x0003236C File Offset: 0x0003056C
65 public Rfc2898DeriveBytes(string password, byte[] salt, int iterations, HashAlgorithmName hashAlgorithm)
66 {
68 }
69
70 // Token: 0x06001771 RID: 6001 RVA: 0x00032380 File Offset: 0x00030580
71 public Rfc2898DeriveBytes(string password, int saltSize)
72 {
74 }
75
76 // Token: 0x06001772 RID: 6002 RVA: 0x00032398 File Offset: 0x00030598
77 public Rfc2898DeriveBytes(string password, int saltSize, int iterations)
78 {
80 }
81
82 // Token: 0x06001773 RID: 6003 RVA: 0x000323B0 File Offset: 0x000305B0
83 public Rfc2898DeriveBytes(string password, int saltSize, int iterations, HashAlgorithmName hashAlgorithm)
84 {
90 this.HashAlgorithm = hashAlgorithm;
91 HMAC hmac = this.OpenHmac();
93 this.Initialize();
94 }
95
96 // Token: 0x17000263 RID: 611
97 // (get) Token: 0x06001774 RID: 6004 RVA: 0x00032404 File Offset: 0x00030604
98 // (set) Token: 0x06001775 RID: 6005 RVA: 0x00032418 File Offset: 0x00030618
99 public int IterationCount
100 {
101 get
102 {
103 /*
104An exception occurred when decompiling this method (06001774)
105
106ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Int32 System.Security.Cryptography.Rfc2898DeriveBytes::get_IterationCount()
107
108 ---> System.Exception: Basic block has to end with unconditional control flow.
109{
110 Block_0:
111 stloc:uint32(var_0_06, ldfld:uint32(Rfc2898DeriveBytes::_iterations, ldloc:Rfc2898DeriveBytes(this)))
112}
113
114 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
115 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
116 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
117 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
118 --- End of inner exception stack trace ---
119 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
120 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
121*/;
122 }
123 set
124 {
125 this._iterations = (uint)value;
126 this.Initialize();
127 }
128 }
129
130 // Token: 0x17000264 RID: 612
131 // (get) Token: 0x06001776 RID: 6006 RVA: 0x00032434 File Offset: 0x00030634
132 // (set) Token: 0x06001777 RID: 6007 RVA: 0x0003244C File Offset: 0x0003064C
133 public byte[] Salt
134 {
135 get
136 {
137 return this._salt.CloneByteArray();
138 }
139 set
140 {
141 if (value != null)
142 {
143 byte[] array = value.CloneByteArray();
145 this.Initialize();
146 return;
147 }
148 }
149 }
150
151 // Token: 0x06001778 RID: 6008 RVA: 0x00032474 File Offset: 0x00030674
152 protected override void Dispose(bool disposing)
153 {
154 HMAC hmac = this._hmac;
155 if (hmac != null)
156 {
157 hmac.Dispose();
158 }
159 if (this._buffer != null)
160 {
161 }
162 if (this._password != null)
163 {
164 }
165 long num;
166 if (this._salt != null)
167 {
168 num = 0L;
169 }
170 base.Dispose(num != 0L);
171 }
172
173 // Token: 0x06001779 RID: 6009 RVA: 0x000324B4 File Offset: 0x000306B4
174 public override byte[] GetBytes(int cb)
175 {
176 int startIndex = this._startIndex;
177 byte[] buffer = this._buffer;
178 int startIndex2 = this._startIndex;
180 return buffer;
181 }
182
183 // Token: 0x0600177A RID: 6010 RVA: 0x0000207A File Offset: 0x0000027A
184 public byte[] CryptDeriveKey(string algname, string alghashname, int keySize, byte[] rgbIV)
185 {
186 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
187 }
188
189 // Token: 0x0600177B RID: 6011 RVA: 0x00032544 File Offset: 0x00030744
190 public override void Reset()
191 {
192 this.Initialize();
193 }
194
195 // Token: 0x0600177C RID: 6012 RVA: 0x00032558 File Offset: 0x00030758
196 private HMAC OpenHmac()
197 {
198 /*
199An exception occurred when decompiling this method (0600177C)
200
201ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Security.Cryptography.HMAC System.Security.Cryptography.Rfc2898DeriveBytes::OpenHmac()
202
203 ---> System.Exception: Basic block has to end with unconditional control flow.
204{
205 Block_0:
206 stloc:HashAlgorithmName(var_0_06, ldfld:HashAlgorithmName(Rfc2898DeriveBytes::<HashAlgorithm>k__BackingField, ldloc:Rfc2898DeriveBytes(this)))
207 stloc:HashAlgorithmName(var_3_0E, callgetter:HashAlgorithmName(HashAlgorithmName::get_SHA1))
208 stloc:bool(var_4_16, call:bool(HashAlgorithmName::op_Equality, ldloc:HashAlgorithmName(var_0_06), ldloc:HashAlgorithmName(var_3_0E)))
209 stloc:uint8[](var_5_1E, ldfld:uint8[](Rfc2898DeriveBytes::_password, ldloc:Rfc2898DeriveBytes(this)))
210 stloc:HashAlgorithmName(var_7_28, callgetter:HashAlgorithmName(HashAlgorithmName::get_SHA256))
211 stloc:HashAlgorithmName(var_10_32, callgetter:HashAlgorithmName(HashAlgorithmName::get_SHA384))
212 stloc:HashAlgorithmName(var_13_3C, callgetter:HashAlgorithmName(HashAlgorithmName::get_SHA512))
213 stloc:string(var_15_4A, call:string(SR::Format, ldstr:string("'{0}' is not a known hash algorithm."), ldloc:uint8[][exp:object](var_5_1E)))
214}
215
216 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
217 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
218 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
219 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
220 --- End of inner exception stack trace ---
221 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
222 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
223*/;
224 }
225
226 // Token: 0x0600177D RID: 6013 RVA: 0x000325B0 File Offset: 0x000307B0
227 private void Initialize()
228 {
229 if (this._buffer != null)
230 {
231 }
232 int blockSize = this._blockSize;
233 }
234
235 // Token: 0x0600177E RID: 6014 RVA: 0x000325CC File Offset: 0x000307CC
236 private byte[] Func()
237 {
238 /*
239An exception occurred when decompiling this method (0600177E)
240
241ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] System.Security.Cryptography.Rfc2898DeriveBytes::Func()
242
243 ---> System.Exception: Basic block has to end with unconditional control flow.
244{
245 IL_0049:
246 call:void(Span`1::CopyTo, ldloc:Span`1[exp:valuetype System.Span`1&](var_11), ldloc:Span`1(var_11))
247 stloc:ReadOnlySpan`1(var_12_59, call:ReadOnlySpan`1(Span`1::op_Implicit, ldloc:Span`1(var_11)))
248}
249
250 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
251 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
252 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
253 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
254 --- End of inner exception stack trace ---
255 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
256 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
257*/;
258 }
259
260 // Token: 0x04000C0F RID: 3087
261 private const int MinimumSaltSize = 8;
262
263 // Token: 0x04000C10 RID: 3088
264 private readonly byte[] _password;
265
266 // Token: 0x04000C11 RID: 3089
267 private byte[] _salt;
268
269 // Token: 0x04000C12 RID: 3090
270 private uint _iterations;
271
272 // Token: 0x04000C13 RID: 3091
273 private HMAC _hmac;
274
275 // Token: 0x04000C14 RID: 3092
276 private int _blockSize;
277
278 // Token: 0x04000C15 RID: 3093
279 private byte[] _buffer;
280
281 // Token: 0x04000C16 RID: 3094
282 private uint _block;
283
284 // Token: 0x04000C17 RID: 3095
285 private int _startIndex;
286
287 // Token: 0x04000C18 RID: 3096
288 private int _endIndex;
289
290 // Token: 0x04000C19 RID: 3097
293 }
294}
class f__AnonymousType0<< Count > j__TPar
static byte[] GenerateRandom(int count)
Definition Helpers.cs:21
override void Dispose(bool disposing)
Definition HMAC.cs:203
Rfc2898DeriveBytes(string password, byte[] salt, int iterations, HashAlgorithmName hashAlgorithm)
Rfc2898DeriveBytes(string password, int saltSize, int iterations)
readonly HashAlgorithmName< HashAlgorithm > k__BackingField
Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations)
Rfc2898DeriveBytes(byte[] password, byte[] salt, int iterations, HashAlgorithmName hashAlgorithm)
Rfc2898DeriveBytes(string password, int saltSize, int iterations, HashAlgorithmName hashAlgorithm)
byte[] CryptDeriveKey(string algname, string alghashname, int keySize, byte[] rgbIV)
Rfc2898DeriveBytes(string password, byte[] salt, int iterations)
Rfc2898DeriveBytes(string password, int saltSize)
static Encoding UTF8
Definition Encoding.cs:828