コード例 #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
ファイル: SampleData.cs プロジェクト: tomnwk/SousTitres
 public bool Equals(SampleData other)
 {
     return other.FileLength == FileLength && other.DataBytes.SequenceEqual(DataBytes);
 }