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
DESTransform.cs
Go to the documentation of this file.
1
using
System
;
2
using
Mono.Security.Cryptography
;
3
4
namespace
System.Security.Cryptography
5
{
6
// Token: 0x02000311 RID: 785
7
internal
class
DESTransform
:
SymmetricTransform
8
{
9
// Token: 0x06001A91 RID: 6801 RVA: 0x00039318 File Offset: 0x00037518
10
internal
DESTransform
(
SymmetricAlgorithm
symmAlgo
,
bool
encryption
,
byte
[]
key
,
byte
[]
iv
)
11
{
12
int
num = 1;
13
base
..ctor(
symmAlgo
,
encryption
,
iv
);
14
byte
[]
strongKey
;
15
if
(
key
==
null
)
16
{
17
if
(num == 0)
18
{
19
}
20
strongKey
=
DESTransform
.
GetStrongKey
();
21
}
22
bool
flag =
DES
.
IsWeakKey
(
strongKey
);
23
if
(num == 0)
24
{
25
}
26
bool
flag2
=
DES
.
IsSemiWeakKey
(
strongKey
);
27
object
obj
;
28
if
(
strongKey
==
null
&&
obj
!=
null
&&
obj
==
null
)
29
{
30
throw
new
InvalidCastException
();
31
}
32
if
(num == 0)
33
{
34
}
35
}
36
37
// Token: 0x06001A92 RID: 6802 RVA: 0x00039370 File Offset: 0x00037570
38
private
uint
CipherFunct
(uint r,
int
n)
39
{
40
int
num = 1;
41
byte
[]
array
= this.
keySchedule
;
42
if
(num == 0)
43
{
44
return
;
45
}
46
}
47
48
// Token: 0x06001A93 RID: 6803 RVA: 0x00039390 File Offset: 0x00037590
49
internal
static
void
Permutation
(
byte
[]
input
,
byte
[] output, uint[]
permTab
,
bool
preSwap
)
50
{
51
if
(!
true
)
52
{
53
}
54
}
55
56
// Token: 0x06001A94 RID: 6804 RVA: 0x000393AC File Offset: 0x000375AC
57
private
static
void
BSwap
(
byte
[]
byteBuff
)
58
{
59
}
60
61
// Token: 0x06001A95 RID: 6805 RVA: 0x000393BC File Offset: 0x000375BC
62
internal
void
SetKey
(
byte
[]
key
)
63
{
64
int
num = 1;
65
byte
[]
array
= this.
keySchedule
;
66
if
(num == 0)
67
{
68
}
69
}
70
71
// Token: 0x06001A96 RID: 6806 RVA: 0x000393F0 File Offset: 0x000375F0
72
public
void
ProcessBlock
(
byte
[]
input
,
byte
[] output)
73
{
74
uint[]
array
= this.
dwordBuff
;
75
if
(!
true
)
76
{
77
}
78
long
num = 0
L
;
79
uint[]
array2
= this.
dwordBuff
;
80
if
(this.
encrypt
)
81
{
82
long
num2
= 0
L
;
83
uint
num3
= this.
CipherFunct
((uint)num, (
int
)
num2
);
84
uint
num4
= this.
CipherFunct
(array, 1);
85
uint
num5
= this.
CipherFunct
(array, 2);
86
uint
num6
= this.
CipherFunct
(array, 3);
87
uint
num7
= this.
CipherFunct
(array, 4);
88
uint
num8
= this.
CipherFunct
(array, 5);
89
uint
num9
= this.
CipherFunct
(array, 6);
90
uint
num10
= this.
CipherFunct
(array, 7);
91
uint
num11
= this.
CipherFunct
(array, 8);
92
uint
num12
= this.
CipherFunct
(array, 9);
93
uint
num13
= this.
CipherFunct
(array, 10);
94
uint
num14
= this.
CipherFunct
(array, 11);
95
uint
num15
= this.
CipherFunct
(array, 12);
96
uint
num16
= this.
CipherFunct
(array, 13);
97
uint
num17
= this.
CipherFunct
(array, 14);
98
return
;
99
}
100
uint
num18
= this.
CipherFunct
(array, 15);
101
uint
num19
= this.
CipherFunct
(array, 14);
102
uint
num20
= this.
CipherFunct
(array, 12);
103
uint
num21
= this.
CipherFunct
(array, 11);
104
uint
num22
= this.
CipherFunct
(array, 10);
105
uint
num23
= this.
CipherFunct
(array, 9);
106
uint
num24
= this.
CipherFunct
(array, 8);
107
uint
num25
= this.
CipherFunct
(array, 7);
108
uint
num26
= this.
CipherFunct
(array, 6);
109
uint
num27
= this.
CipherFunct
(array, 5);
110
uint
num28
= this.
CipherFunct
(array, 4);
111
uint
num29
= this.
CipherFunct
(array, 3);
112
uint
num30
= this.
CipherFunct
(array, 2);
113
uint
num31
= this.
CipherFunct
(array, 1);
114
long
num32
= 0
L
;
115
uint
num33
= this.
CipherFunct
(array, (
int
)
num32
);
116
uint[]
array3
= this.
dwordBuff
;
117
if
(array2 ==
null
)
118
{
119
}
120
}
121
122
// Token: 0x06001A97 RID: 6807 RVA: 0x00039568 File Offset: 0x00037768
123
protected
override
void
ECB
(
byte
[]
input
,
byte
[] output)
124
{
125
if
(!
true
)
126
{
127
}
128
byte
[]
array
= this.
byteBuff
;
129
this.
ProcessBlock
(output,
array
);
130
byte
[]
array2
= this.
byteBuff
;
131
}
132
133
// Token: 0x06001A98 RID: 6808 RVA: 0x00039590 File Offset: 0x00037790
134
internal
static
byte
[]
GetStrongKey
()
135
{
136
if
(
"AnyAtomicType"
==
null
)
137
{
138
}
139
byte
[]
array
=
KeyBuilder
.
Key
(41730048);
140
bool
flag =
DES
.
IsWeakKey
(
array
);
141
bool
flag2
=
DES
.
IsSemiWeakKey
(
array
);
142
return
41730048;
143
}
144
145
// Token: 0x06001A99 RID: 6809 RVA: 0x000395C4 File Offset: 0x000377C4
146
// Note: this type is marked as 'beforefieldinit'.
147
static
DESTransform
()
148
{
149
}
150
151
// Token: 0x04000D85 RID: 3461
152
internal
static
readonly
int
KEY_BIT_SIZE
;
153
154
// Token: 0x04000D86 RID: 3462
155
internal
static
readonly
int
KEY_BYTE_SIZE
;
156
157
// Token: 0x04000D87 RID: 3463
158
internal
static
readonly
int
BLOCK_BIT_SIZE
;
159
160
// Token: 0x04000D88 RID: 3464
161
internal
static
readonly
int
BLOCK_BYTE_SIZE
;
162
163
// Token: 0x04000D89 RID: 3465
164
private
byte
[]
keySchedule
;
165
166
// Token: 0x04000D8A RID: 3466
167
private
byte
[]
byteBuff
;
168
169
// Token: 0x04000D8B RID: 3467
170
private
uint[]
dwordBuff
;
171
172
// Token: 0x04000D8C RID: 3468
173
private
static
readonly
uint[]
spBoxes
;
174
175
// Token: 0x04000D8D RID: 3469
176
private
static
readonly
byte
[]
PC1
;
177
178
// Token: 0x04000D8E RID: 3470
179
private
static
readonly
byte
[]
leftRotTotal
;
180
181
// Token: 0x04000D8F RID: 3471
182
private
static
readonly
byte
[]
PC2
;
183
184
// Token: 0x04000D90 RID: 3472
185
internal
static
readonly
uint[]
ipTab
;
186
187
// Token: 0x04000D91 RID: 3473
188
internal
static
readonly
uint[]
fpTab
;
189
}
190
}
j__TPar
class f__AnonymousType0<< Count > j__TPar
Definition
--f__AnonymousType0.cs:8
Mono.Security.Cryptography.KeyBuilder.Key
static byte[] Key(int size)
Definition
KeyBuilder.cs:38
Mono.Security.Cryptography.KeyBuilder
Definition
KeyBuilder.cs:8
Mono.Security.Cryptography.SymmetricTransform.encrypt
bool encrypt
Definition
SymmetricTransform.cs:371
Mono.Security.Cryptography.SymmetricTransform
Definition
SymmetricTransform.cs:9
System.InvalidCastException
Definition
InvalidCastException.cs:9
System.Security.Cryptography.DESTransform.BSwap
static void BSwap(byte[] byteBuff)
Definition
DESTransform.cs:57
System.Security.Cryptography.DESTransform.KEY_BIT_SIZE
static readonly int KEY_BIT_SIZE
Definition
DESTransform.cs:152
System.Security.Cryptography.DESTransform.leftRotTotal
static readonly byte[] leftRotTotal
Definition
DESTransform.cs:179
System.Security.Cryptography.DESTransform.PC2
static readonly byte[] PC2
Definition
DESTransform.cs:182
System.Security.Cryptography.DESTransform.Permutation
static void Permutation(byte[] input, byte[] output, uint[] permTab, bool preSwap)
Definition
DESTransform.cs:49
System.Security.Cryptography.DESTransform.ProcessBlock
void ProcessBlock(byte[] input, byte[] output)
Definition
DESTransform.cs:72
System.Security.Cryptography.DESTransform.BLOCK_BYTE_SIZE
static readonly int BLOCK_BYTE_SIZE
Definition
DESTransform.cs:161
System.Security.Cryptography.DESTransform.DESTransform
DESTransform(SymmetricAlgorithm symmAlgo, bool encryption, byte[] key, byte[] iv)
Definition
DESTransform.cs:10
System.Security.Cryptography.DESTransform.CipherFunct
uint CipherFunct(uint r, int n)
Definition
DESTransform.cs:38
System.Security.Cryptography.DESTransform.GetStrongKey
static byte[] GetStrongKey()
Definition
DESTransform.cs:134
System.Security.Cryptography.DESTransform.SetKey
void SetKey(byte[] key)
Definition
DESTransform.cs:62
System.Security.Cryptography.DESTransform.BLOCK_BIT_SIZE
static readonly int BLOCK_BIT_SIZE
Definition
DESTransform.cs:158
System.Security.Cryptography.DESTransform.dwordBuff
uint[] dwordBuff
Definition
DESTransform.cs:170
System.Security.Cryptography.DESTransform.byteBuff
byte[] byteBuff
Definition
DESTransform.cs:167
System.Security.Cryptography.DESTransform.DESTransform
static DESTransform()
Definition
DESTransform.cs:147
System.Security.Cryptography.DESTransform.spBoxes
static readonly uint[] spBoxes
Definition
DESTransform.cs:173
System.Security.Cryptography.DESTransform.ipTab
static readonly uint[] ipTab
Definition
DESTransform.cs:185
System.Security.Cryptography.DESTransform.PC1
static readonly byte[] PC1
Definition
DESTransform.cs:176
System.Security.Cryptography.DESTransform.ECB
override void ECB(byte[] input, byte[] output)
Definition
DESTransform.cs:123
System.Security.Cryptography.DESTransform.KEY_BYTE_SIZE
static readonly int KEY_BYTE_SIZE
Definition
DESTransform.cs:155
System.Security.Cryptography.DESTransform.keySchedule
byte[] keySchedule
Definition
DESTransform.cs:164
System.Security.Cryptography.DESTransform.fpTab
static readonly uint[] fpTab
Definition
DESTransform.cs:188
System.Security.Cryptography.DESTransform
Definition
DESTransform.cs:8
System.Security.Cryptography.DES.IsWeakKey
static bool IsWeakKey(byte[] rgbKey)
Definition
DES.cs:92
System.Security.Cryptography.DES.IsSemiWeakKey
static bool IsSemiWeakKey(byte[] rgbKey)
Definition
DES.cs:101
System.Security.Cryptography.DES
Definition
DES.cs:10
System.Security.Cryptography.SymmetricAlgorithm
Definition
SymmetricAlgorithm.cs:10
Mono.Security.Cryptography
Definition
ARC4Managed.cs:6
System.Security.Cryptography
Definition
Aes.cs:5
System.ExceptionArgument.key
@ key
System.ExceptionArgument.input
@ input
System.ExceptionArgument.obj
@ obj
System.ExceptionArgument.array
@ array
System.ConsoleKey.L
@ L
System
Definition
__ComObject.cs:4
source
mscorlib
System
Security
Cryptography
DESTransform.cs
Generated by
1.10.0