Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
RijndaelImplementation.cs
Go to the documentation of this file.
1using System;
3
5
6[Obsolete("The Rijndael and RijndaelManaged types are obsolete. Use Aes instead.", DiagnosticId = "SYSLIB0022", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
7internal sealed class RijndaelImplementation : Rijndael
8{
9 private readonly Aes _impl;
10
11 public override int BlockSize
12 {
13 get
14 {
15 return _impl.BlockSize;
16 }
17 set
18 {
19 switch (value)
20 {
21 case 192:
22 case 256:
24 default:
26 case 128:
27 break;
28 }
29 }
30 }
31
32 public override int FeedbackSize
33 {
34 get
35 {
36 return _impl.FeedbackSize;
37 }
38 set
39 {
40 _impl.FeedbackSize = value;
41 }
42 }
43
44 public override byte[] IV
45 {
46 get
47 {
48 return _impl.IV;
49 }
50 set
51 {
52 _impl.IV = value;
53 }
54 }
55
56 public override byte[] Key
57 {
58 get
59 {
60 return _impl.Key;
61 }
62 set
63 {
64 _impl.Key = value;
65 }
66 }
67
68 public override int KeySize
69 {
70 get
71 {
72 return _impl.KeySize;
73 }
74 set
75 {
76 _impl.KeySize = value;
77 }
78 }
79
80 public override CipherMode Mode
81 {
82 get
83 {
84 return _impl.Mode;
85 }
86 set
87 {
88 _impl.Mode = value;
89 }
90 }
91
92 public override PaddingMode Padding
93 {
94 get
95 {
96 return _impl.Padding;
97 }
98 set
99 {
100 _impl.Padding = value;
101 }
102 }
103
105
107 {
109 {
110 new KeySizes(128, 128, 0)
111 };
112 _impl = Aes.Create();
113 _impl.FeedbackSize = 128;
114 }
115
117 {
118 return _impl.CreateEncryptor();
119 }
120
121 public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
122 {
123 return _impl.CreateEncryptor(rgbKey, rgbIV);
124 }
125
127 {
128 return _impl.CreateDecryptor();
129 }
130
131 public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)
132 {
133 return _impl.CreateDecryptor(rgbKey, rgbIV);
134 }
135
136 public override void GenerateIV()
137 {
139 }
140
141 public override void GenerateKey()
142 {
144 }
145
146 protected override void Dispose(bool disposing)
147 {
148 if (disposing)
149 {
150 _impl.Dispose();
151 }
152 }
153}
override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[] rgbIV)
override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[] rgbIV)
static string Cryptography_Rijndael_BlockSize
Definition SR.cs:136
Definition SR.cs:7
static new Aes Create()
Definition Aes.cs:30