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

◆ HashPrefix()

void System.Security.Cryptography.PasswordDeriveBytes.HashPrefix ( CryptoStream cs)
inlineprivate

Definition at line 278 of file PasswordDeriveBytes.cs.

279 {
280 if (_prefix > 999)
281 {
282 throw new CryptographicException(System.SR.Cryptography_PasswordDerivedBytes_TooManyBytes);
283 }
284 int num = 0;
285 byte[] array = new byte[3] { 48, 48, 48 };
286 if (_prefix >= 100)
287 {
288 array[0] += (byte)(_prefix / 100);
289 num++;
290 }
291 if (_prefix >= 10)
292 {
293 array[num] += (byte)(_prefix % 100 / 10);
294 num++;
295 }
296 if (_prefix > 0)
297 {
298 array[num] += (byte)(_prefix % 10);
299 num++;
300 cs.Write(array, 0, num);
301 }
302 _prefix++;
303 }
static string Cryptography_PasswordDerivedBytes_TooManyBytes
Definition SR.cs:60
Definition SR.cs:7

References System.Security.Cryptography.PasswordDeriveBytes._prefix, System.array, System.SR.Cryptography_PasswordDerivedBytes_TooManyBytes, and System.Security.Cryptography.CryptoStream.Write().

Referenced by System.Security.Cryptography.PasswordDeriveBytes.ComputeBytes().