Example #1
0
 private void AddBlockHash(MurmurHash3 hash)
 {
     hash.GetHashBytes(_blockHashes, _currentBlockOffset);
     _currentBlockOffset += 8;
     if (_currentBlockOffset == BlockSize)
     {
         CombineBlockHashes();
     }
 }
Example #2
0
        private void CombineBlockHashes()
        {
            unsafe
            {
                fixed(byte *arrayPtr = _blockHashes)
                {
                    MurmurHash3 combinedHash = MurmurHash3.Create(arrayPtr, _currentBlockOffset, AlgorithmSeed);

                    combinedHash.GetHashBytes(_blockHashes, 0);
                    _currentBlockOffset = 8;
                }
            }
        }