OpenStory.Cryptography.RollingIv.GetVersionInternal C# (CSharp) Method

GetVersionInternal() private static method

private static GetVersionInternal ( byte header, byte iv ) : ushort
header byte
iv byte
return ushort
        private static ushort GetVersionInternal(byte[] header, byte[] iv)
        {
            var encodedVersion = (ushort)((header[0] << 8) | header[1]);
            var xorSegment = (ushort)((iv[2] << 8) | iv[3]);
            return (ushort)(encodedVersion ^ xorSegment);
        }