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
SymmetricAlgorithm.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x02000308 RID: 776
8 [ComVisible(true)]
9 public abstract class SymmetricAlgorithm : IDisposable
10 {
11 // Token: 0x06001A27 RID: 6695 RVA: 0x0003834C File Offset: 0x0003654C
13 {
14 }
15
16 // Token: 0x06001A28 RID: 6696 RVA: 0x00038360 File Offset: 0x00036560
17 public void Dispose()
18 {
19 GC.SuppressFinalize(this);
20 }
21
22 // Token: 0x06001A29 RID: 6697 RVA: 0x00038374 File Offset: 0x00036574
23 public void Clear()
24 {
25 }
26
27 // Token: 0x06001A2A RID: 6698 RVA: 0x00038384 File Offset: 0x00036584
28 protected virtual void Dispose(bool disposing)
29 {
30 if (this.KeyValue != null)
31 {
32 }
33 if (this.IVValue != null)
34 {
35 }
36 }
37
38 // Token: 0x170002D2 RID: 722
39 // (get) Token: 0x06001A2B RID: 6699 RVA: 0x000383A4 File Offset: 0x000365A4
40 // (set) Token: 0x06001A2C RID: 6700 RVA: 0x000383B8 File Offset: 0x000365B8
41 public virtual int BlockSize
42 {
43 get
44 {
45 return this.BlockSizeValue;
46 }
47 set
48 {
50 }
51 }
52
53 // Token: 0x170002D3 RID: 723
54 // (get) Token: 0x06001A2D RID: 6701 RVA: 0x000383E0 File Offset: 0x000365E0
55 // (set) Token: 0x06001A2E RID: 6702 RVA: 0x000383F4 File Offset: 0x000365F4
56 public virtual int FeedbackSize
57 {
58 get
59 {
60 return this.FeedbackSizeValue;
61 }
62 set
63 {
64 int blockSizeValue = this.BlockSizeValue;
66 }
67 }
68
69 // Token: 0x170002D4 RID: 724
70 // (get) Token: 0x06001A2F RID: 6703 RVA: 0x0003841C File Offset: 0x0003661C
71 // (set) Token: 0x06001A30 RID: 6704 RVA: 0x00038444 File Offset: 0x00036644
72 public virtual byte[] IV
73 {
74 get
75 {
76 if (this.IVValue == null)
77 {
78 byte[] ivvalue = this.IVValue;
79 }
80 object obj;
81 if (obj == null || obj != null)
82 {
83 }
84 throw new InvalidCastException();
85 }
86 set
87 {
88 if (value != null)
89 {
90 int blockSizeValue = this.BlockSizeValue;
91 object obj;
92 if (obj != null)
93 {
94 if (obj == null)
95 {
96 goto IL_002C;
97 }
99 if (obj == null)
100 {
101 throw new InvalidCastException();
102 }
103 }
104 return;
105 }
106 string resourceString = Environment.GetResourceString("Specified initialization vector (IV) does not match the block size for this algorithm.");
107 IL_002C:
108 throw new InvalidCastException();
109 }
110 }
111
112 // Token: 0x170002D5 RID: 725
113 // (get) Token: 0x06001A31 RID: 6705 RVA: 0x00038484 File Offset: 0x00036684
114 // (set) Token: 0x06001A32 RID: 6706 RVA: 0x000384AC File Offset: 0x000366AC
115 public virtual byte[] Key
116 {
117 get
118 {
119 if (this.KeyValue == null)
120 {
121 byte[] keyValue = this.KeyValue;
122 }
123 object obj;
124 if (obj == null || obj != null)
125 {
126 }
127 throw new InvalidCastException();
128 }
129 set
130 {
131 /*
132An exception occurred when decompiling this method (06001A32)
133
134ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Void System.Security.Cryptography.SymmetricAlgorithm::set_Key(System.Byte[])
135
136 ---> System.Exception: Basic block has to end with unconditional control flow.
137{
138 IL_0013:
139 stloc:string(var_2_1D, call:string(Environment::GetResourceString, ldstr:string("Specified key is not a valid size for this algorithm.")))
140}
141
142 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
143 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
144 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
145 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
146 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
147 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
148 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
149 --- End of inner exception stack trace ---
150 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
151 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
152*/;
153 }
154 }
155
156 // Token: 0x170002D6 RID: 726
157 // (get) Token: 0x06001A33 RID: 6707 RVA: 0x000384D8 File Offset: 0x000366D8
158 public virtual KeySizes[] LegalBlockSizes
159 {
160 get
161 {
163 object obj;
164 if (obj == null || obj != null)
165 {
166 }
167 throw new InvalidCastException();
168 }
169 }
170
171 // Token: 0x170002D7 RID: 727
172 // (get) Token: 0x06001A34 RID: 6708 RVA: 0x000384F8 File Offset: 0x000366F8
173 public virtual KeySizes[] LegalKeySizes
174 {
175 get
176 {
178 object obj;
179 if (obj == null || obj != null)
180 {
181 }
182 throw new InvalidCastException();
183 }
184 }
185
186 // Token: 0x170002D8 RID: 728
187 // (get) Token: 0x06001A35 RID: 6709 RVA: 0x00038518 File Offset: 0x00036718
188 // (set) Token: 0x06001A36 RID: 6710 RVA: 0x0003852C File Offset: 0x0003672C
189 public virtual int KeySize
190 {
191 get
192 {
193 return this.KeySizeValue;
194 }
195 set
196 {
197 bool flag = this.ValidKeySize(value);
199 }
200 }
201
202 // Token: 0x170002D9 RID: 729
203 // (get) Token: 0x06001A37 RID: 6711 RVA: 0x00038554 File Offset: 0x00036754
204 // (set) Token: 0x06001A38 RID: 6712 RVA: 0x00038568 File Offset: 0x00036768
205 public virtual CipherMode Mode
206 {
207 get
208 {
209 return this.ModeValue;
210 }
211 set
212 {
214 }
215 }
216
217 // Token: 0x170002DA RID: 730
218 // (get) Token: 0x06001A39 RID: 6713 RVA: 0x00038588 File Offset: 0x00036788
219 // (set) Token: 0x06001A3A RID: 6714 RVA: 0x0003859C File Offset: 0x0003679C
220 public virtual PaddingMode Padding
221 {
222 get
223 {
224 return this.PaddingValue;
225 }
226 set
227 {
229 }
230 }
231
232 // Token: 0x06001A3B RID: 6715 RVA: 0x000385BC File Offset: 0x000367BC
233 public bool ValidKeySize(int bitLength)
234 {
235 /*
236An exception occurred when decompiling this method (06001A3B)
237
238ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean System.Security.Cryptography.SymmetricAlgorithm::ValidKeySize(System.Int32)
239
240 ---> System.Exception: Basic block has to end with unconditional control flow.
241{
242 Block_0:
243 stloc:uint8[](var_0_09, ldfld:uint8[](SymmetricAlgorithm::IVValue, ldloc:SymmetricAlgorithm(this)))
244}
245
246 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
247 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
248 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
249 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
250 --- End of inner exception stack trace ---
251 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
252 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
253*/;
254 }
255
256 // Token: 0x06001A3C RID: 6716 RVA: 0x0000207A File Offset: 0x0000027A
258 {
259 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
260 }
261
262 // Token: 0x06001A3D RID: 6717 RVA: 0x000385D8 File Offset: 0x000367D8
263 public static SymmetricAlgorithm Create(string algName)
264 {
265 if (!true)
266 {
267 }
268 object obj;
269 if (obj != null)
270 {
271 }
272 throw new InvalidCastException();
273 }
274
275 // Token: 0x06001A3E RID: 6718 RVA: 0x0000207A File Offset: 0x0000027A
277 {
278 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
279 }
280
281 // Token: 0x06001A3F RID: 6719
282 public abstract ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV);
283
284 // Token: 0x06001A40 RID: 6720 RVA: 0x0000207A File Offset: 0x0000027A
286 {
287 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
288 }
289
290 // Token: 0x06001A41 RID: 6721
291 public abstract ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV);
292
293 // Token: 0x06001A42 RID: 6722
294 public abstract void GenerateKey();
295
296 // Token: 0x06001A43 RID: 6723
297 public abstract void GenerateIV();
298
299 // Token: 0x04000D2B RID: 3371
300 protected int BlockSizeValue;
301
302 // Token: 0x04000D2C RID: 3372
303 protected int FeedbackSizeValue;
304
305 // Token: 0x04000D2D RID: 3373
306 protected byte[] IVValue;
307
308 // Token: 0x04000D2E RID: 3374
309 protected byte[] KeyValue;
310
311 // Token: 0x04000D2F RID: 3375
313
314 // Token: 0x04000D30 RID: 3376
316
317 // Token: 0x04000D31 RID: 3377
318 protected int KeySizeValue;
319
320 // Token: 0x04000D32 RID: 3378
322
323 // Token: 0x04000D33 RID: 3379
325 }
326}
class f__AnonymousType0<< Count > j__TPar
static string GetResourceString(string key)
static void SuppressFinalize(object obj)
Definition GC.cs:116
ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
static SymmetricAlgorithm Create(string algName)
ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)