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
PKCS1.cs
Go to the documentation of this file.
1using System;
4
6{
7 // Token: 0x02000058 RID: 88
8 public sealed class PKCS1
9 {
10 // Token: 0x0600025C RID: 604 RVA: 0x000096E4 File Offset: 0x000078E4
11 private static bool Compare(byte[] array1, byte[] array2)
12 {
13 }
14
15 // Token: 0x0600025D RID: 605 RVA: 0x00002050 File Offset: 0x00000250
16 public static byte[] I2OSP(byte[] x, int size)
17 {
18 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
19 }
20
21 // Token: 0x0600025E RID: 606 RVA: 0x000096F8 File Offset: 0x000078F8
22 public static byte[] OS2IP(byte[] x)
23 {
24 /*
25An exception occurred when decompiling this method (0600025E)
26
27ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] Mono.Security.Cryptography.PKCS1::OS2IP(System.Byte[])
28
29 ---> System.Exception: Basic block has to end with unconditional control flow.
30{
31 IL_0005:
32 brtrue(IL_0000, logicnot:bool(ldloc:int64[exp:bool](var_0_01)))
33}
34
35 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
36 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
37 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
38 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
39 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
40 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
41 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
42 --- End of inner exception stack trace ---
43 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
44 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
45*/;
46 }
47
48 // Token: 0x0600025F RID: 607 RVA: 0x00002050 File Offset: 0x00000250
49 public static byte[] RSAVP1(RSA rsa, byte[] s)
50 {
51 throw new AnalysisFailedException("CPP2IL failed to recover any usable IL for this method.");
52 }
53
54 // Token: 0x06000260 RID: 608 RVA: 0x0000970C File Offset: 0x0000790C
55 public static bool Verify_v15(RSA rsa, HashAlgorithm hash, byte[] hashValue, byte[] signature, bool tryNonStandardEncoding)
56 {
57 /*
58An exception occurred when decompiling this method (06000260)
59
60ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Boolean Mono.Security.Cryptography.PKCS1::Verify_v15(System.Security.Cryptography.RSA,System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Byte[],System.Boolean)
61
62 ---> System.Exception: Basic block has to end with unconditional control flow.
63{
64 Block_0:
65 stloc:uint8[](var_0_10, call:uint8[](PKCS1::I2OSP, call:uint8[](PKCS1::OS2IP, ldloc:uint8[](hashValue)), ldc.i4:int32(43151360)))
66 stloc:uint8[](var_4_1B, ldfld:uint8[](HashAlgorithm::HashValue, ldloc:HashAlgorithm(hash)))
67 stloc:uint8[](var_6_27, ldfld:uint8[](HashAlgorithm::HashValue, ldloc:HashAlgorithm(hash)))
68}
69
70 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
71 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
72 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
73 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
74 --- End of inner exception stack trace ---
75 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
76 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
77*/;
78 }
79
80 // Token: 0x06000261 RID: 609 RVA: 0x0000974C File Offset: 0x0000794C
81 public static byte[] Encode_v15(HashAlgorithm hash, byte[] hashValue, int emLength)
82 {
83 /*
84An exception occurred when decompiling this method (06000261)
85
86ICSharpCode.Decompiler.DecompilerException: Error decompiling System.Byte[] Mono.Security.Cryptography.PKCS1::Encode_v15(System.Security.Cryptography.HashAlgorithm,System.Byte[],System.Int32)
87
88 ---> System.Exception: Basic block has to end with unconditional control flow.
89{
90 IL_0024:
91 stloc:uint8[](var_11_2A, ldfld:uint8[](HashAlgorithm::HashValue, ldloc:HashAlgorithm(hash)))
92 stloc:int64(var_12_2D, ldc.i4:int64(0))
93 stloc:int32(var_13_37, call:int32(Math::Max, ldc.i4:int32(8), ldloc:int64[exp:int32](var_12_2D)))
94}
95
96 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
97 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
98 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
99 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
100 --- End of inner exception stack trace ---
101 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
102 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
103*/;
104 }
105
106 // Token: 0x06000262 RID: 610 RVA: 0x00009794 File Offset: 0x00007994
107 internal static string HashNameFromOid(string oid, bool throwOnError = true)
108 {
109 uint num = <PrivateImplementationDetails>.ComputeStringHash("RIPEMD160");
110 return "SHA384";
111 }
112
113 // Token: 0x06000263 RID: 611 RVA: 0x000097C8 File Offset: 0x000079C8
114 internal static HashAlgorithm CreateFromOid(string oid)
115 {
116 if (!true)
117 {
118 }
119 string text;
120 return PKCS1.CreateFromName(text);
121 }
122
123 // Token: 0x06000264 RID: 612 RVA: 0x000097E0 File Offset: 0x000079E0
124 internal static HashAlgorithm CreateFromName(string name)
125 {
126 uint num = <PrivateImplementationDetails>.ComputeStringHash("RIPEMD160");
127 SHA1 sha = SHA1.Create();
128 MD2 md = MD2.Create();
129 MD5 md2 = MD5.Create();
133 MD4 md3 = MD4.Create();
135 object obj;
136 if (obj != null)
137 {
138 }
139 throw new InvalidCastException();
140 }
141
142 // Token: 0x06000265 RID: 613 RVA: 0x00009894 File Offset: 0x00007A94
143 // Note: this type is marked as 'beforefieldinit'.
144 static PKCS1()
145 {
146 }
147
148 // Token: 0x0400025F RID: 607
149 private static byte[] emptySHA1;
150
151 // Token: 0x04000260 RID: 608
152 private static byte[] emptySHA256;
153
154 // Token: 0x04000261 RID: 609
155 private static byte[] emptySHA384;
156
157 // Token: 0x04000262 RID: 610
158 private static byte[] emptySHA512;
159 }
160}
class f__AnonymousType0<< Count > j__TPar
static new MD2 Create()
Definition MD2.cs:17
static new MD4 Create()
Definition MD4.cs:17
static byte[] Encode_v15(HashAlgorithm hash, byte[] hashValue, int emLength)
Definition PKCS1.cs:81
static string HashNameFromOid(string oid, bool throwOnError=true)
Definition PKCS1.cs:107
static bool Compare(byte[] array1, byte[] array2)
Definition PKCS1.cs:11
static HashAlgorithm CreateFromName(string name)
Definition PKCS1.cs:124
static bool Verify_v15(RSA rsa, HashAlgorithm hash, byte[] hashValue, byte[] signature, bool tryNonStandardEncoding)
Definition PKCS1.cs:55
static HashAlgorithm CreateFromOid(string oid)
Definition PKCS1.cs:114
static byte[] OS2IP(byte[] x)
Definition PKCS1.cs:22
static byte[] RSAVP1(RSA rsa, byte[] s)
Definition PKCS1.cs:49
static byte[] I2OSP(byte[] x, int size)
Definition PKCS1.cs:16
static new MD5 Create()
Definition MD5.cs:18
static new RIPEMD160 Create()
Definition RIPEMD160.cs:18
static new SHA1 Create()
Definition SHA1.cs:18
static new SHA256 Create()
Definition SHA256.cs:18
static new SHA384 Create()
Definition SHA384.cs:18
static new SHA512 Create()
Definition SHA512.cs:18