public static byte[] ComputeHash(byte[] userContextIdBinary, byte[] timestampBinary, string logOnUniqueKey, out long keyIndex, out int segmentIndex)
        {
            long ticks = BitConverter.ToInt64(timestampBinary, 0);

            byte[] array;
            if (Canary15DataManager.GetEntry(ticks, out array, out keyIndex, out segmentIndex))
            {
                byte[] bytes = new UnicodeEncoding().GetBytes(logOnUniqueKey);
                int    num   = userContextIdBinary.Length + timestampBinary.Length + bytes.Length;
                num += array.Length;
                byte[] array2 = new byte[num];
                int    num2   = 0;
                userContextIdBinary.CopyTo(array2, num2);
                num2 += userContextIdBinary.Length;
                timestampBinary.CopyTo(array2, num2);
                num2 += timestampBinary.Length;
                bytes.CopyTo(array2, num2);
                num2 += bytes.Length;
                array.CopyTo(array2, num2);
                byte[] result;
                using (SHA256Cng sha256Cng = new SHA256Cng())
                {
                    result = sha256Cng.ComputeHash(array2);
                    sha256Cng.Clear();
                }
                return(result);
            }
            return(null);
        }