Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetBytes()

override byte[] System.Security.Cryptography.PasswordDeriveBytes.GetBytes ( int cb)
inline

Definition at line 163 of file PasswordDeriveBytes.cs.

164 {
165 int num = 0;
166 byte[] array = new byte[cb];
167 if (_baseValue == null)
168 {
170 }
171 else if (_extra != null)
172 {
173 num = _extra.Length - _extraCount;
174 if (num >= cb)
175 {
176 Buffer.BlockCopy(_extra, _extraCount, array, 0, cb);
177 if (num > cb)
178 {
179 _extraCount += cb;
180 }
181 else
182 {
183 _extra = null;
184 }
185 return array;
186 }
187 Buffer.BlockCopy(_extra, num, array, 0, num);
188 _extra = null;
189 }
190 byte[] array2 = ComputeBytes(cb - num);
191 Buffer.BlockCopy(array2, 0, array, num, cb - num);
192 if (array2.Length + num > cb)
193 {
194 _extra = array2;
195 _extraCount = cb - num;
196 }
197 return array;
198 }

References System.Security.Cryptography.PasswordDeriveBytes._baseValue, System.Security.Cryptography.PasswordDeriveBytes._extra, System.Security.Cryptography.PasswordDeriveBytes._extraCount, System.array, System.Buffer.BlockCopy(), System.Security.Cryptography.PasswordDeriveBytes.ComputeBaseValue(), and System.Security.Cryptography.PasswordDeriveBytes.ComputeBytes().