示例#1
0
        public string ComputeHash(SampleData inputData)
        {
            var lhash = (ulong) inputData.FileLength;
            for (var i = 0; i < inputData.DataBytes.Length; i += 8)
                unchecked
                {
                    lhash += BitConverter.ToUInt64(inputData.DataBytes, i);
                }

            return lhash.ToString("x16");
        }
示例#2
0
 public bool Equals(SampleData other)
 {
     return other.FileLength == FileLength && other.DataBytes.SequenceEqual(DataBytes);
 }