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

◆ FixupKeyParity()

static byte[] Internal.Cryptography.Helpers.FixupKeyParity ( this byte[] key)
inlinestatic

Definition at line 31 of file Helpers.cs.

32 {
33 byte[] array = new byte[key.Length];
34 for (int i = 0; i < key.Length; i++)
35 {
36 array[i] = (byte)(key[i] & 0xFEu);
37 byte b = (byte)((array[i] & 0xFu) ^ (uint)(array[i] >> 4));
38 byte b2 = (byte)((b & 3u) ^ (uint)(b >> 2));
39 if ((byte)((b2 & 1) ^ (b2 >> 1)) == 0)
40 {
41 array[i] |= 1;
42 }
43 }
44 return array;
45 }

References System.array, and System.key.